Answers for "c# error CS0200"

C#
1

c# error CS0200

/*		Sedan.cs(41,5): error CS0200: Property or indexer
		'Sedan.Speed' cannot be assigned to -- it is read only 		*/

public void SpeedUp()
    {
    Speed += 5;
    }					//Trying to change/set value

public double Speed
    { get; }			//Property  speed doesn't have setter
    
public double Speed
    { get; set; }		//Fixes error
Posted by: Guest on March-05-2020

Code answers related to "c# error CS0200"

C# Answers by Framework

Browse Popular Code Answers by Language