Last active
October 10, 2016 01:30
-
-
Save skooltch84/eba1c118aefd58c18629ae916131a300 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car { | |
public readonly int NumberOfWheels; //readonly keyword doesn't allow user to change the values | |
private readonly int NumberOfDoors | |
//Car Constructor Method which takes parameters of NumberOfWheels and NumberOfDoors | |
public Car(int NumberOfWheels, int NumberOfDoors){ | |
//Initializing the fields with method level variables | |
NumberOfWheels = numberOfWheels; | |
NumberOfDoors = numberOfDoors; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment