Readonly Property : readonly « Class Interface « C# / C Sharp
- C# / C Sharp
- Class Interface
- readonly
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);
}
}
Related examples in the same category