CSharp examples for Language Basics:Hello World
Add XML documentation to class
using System;/*from www. ja v a 2s . co m*/ ///<summary>The Car class represents a car in the car game </summary> ///<remarks>The car can be moved forward and backward</remarks> class Car { ///<summary> distance represents the amount ///of kilometers the car has driven </summary> private uint distance = 0; ///<summary> Used to move the car forward and backward </summary> ///<remarks> To reverse the car you must pass a negative argument </remarks> public void Move(uint addDistance) { distance += addDistance; Console.WriteLine("Moving {0} kilometers", addDistance); } } class Tester { public static void Main() { Car myCar = new Car(); myCar.Move(100); } }