Ask your technical questions on forums or here :
ASP.NET or MVC | C# | Windows Phone
Microsoft Technology Journals by Abhimanyu K Vatsa
HOME ABOUT RAZOR BOOK SPEAKING MVC ASP.NET JQUERY VIDEOS ARCHIVE CONTACT

22 May 2012

Tips: shortcut way to create properties in c-sharp

You could type "prop" and then press tab, that will generate the following.

        public TYPE Type { get; set; }

Then you change "TYPE" and "Type"

        public string myString {get; set;}

You can also get the full property typing "propfull" and then tab, that would generate the field and the full property.

        private int myVar;
        public int MyProperty        {
   
        get { return myVar;}
   
        set { myVar = value;}        }

Comment using Google Services (2 comments):