0

[SOLVED] What is the difference between Classes and Methods in C#?

The title explains everything. I’m just confused because they seems the same but I still don’t understand where is the difference. Maybe people use to call one when return a value and the other when return to nothing, but at the end they are the same concept?! Thx

14th Sep 2018, 12:31 PM
Kevin Baselice
Kevin Baselice - avatar
2 Answers
+ 1
class is collection of objects and methods. ex. vehicle is class, where it contains object car and method start() stop(). Methods can't contain class, as per ex you can't write class in start() stop() method
14th Sep 2018, 1:31 PM
Pramod Patil
Pramod Patil - avatar
0
Excellent answer! Thank you so much!! Reading your answer I was wondering...: is it possible to have 2 classes into the same script? I don’t think so, but I just want to be sure.
15th Sep 2018, 5:51 PM
Kevin Baselice
Kevin Baselice - avatar