Mega Code Archive

 
Categories / C# / Class Interface
 

Readonly Property

using System; //VersionTest public class VersionReporter {     public static string version {         get {             return "2.0.0.0";         }     }     public VersionReporter() {     } } class VersionOutput {     static void Main(string[] args) {         string ver = VersionReporter.version;         Console.WriteLine("Using version {0}", ver);     } }