Mega Code Archive

 
Categories / ASP.Net Tutorial / Development
 

Create read-only properties

File: ServerTime.cs using System; public class ServerTime {     public string CurrentTime     {         get         {             return DateTime.Now.ToString();         }     } }