Readonly Property

image_pdfimage_print
   
 
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);
    }
}