visual studio - how to use c# snippet prop? -


just got know c# snippet. unable use them in code. me out please, messed set , how work.

here test class named "myclass"

namespace windowsformsapplication1  {     class myclass     {         public string getmessage(string givenname)         {             return "hb "+givenname;         }          private string bmessage;          public string myproperty         {             { return bmessage; }             set { bmessage = value; }         }      } } 

in button code form. unable use these set. ll great if clears how can use these set. "myproperty" here? know not method. purpose? thanks

snippets not executable statements. short-cuts in writing executable statements.

for e.g.

if write prop , press enter, give auto-generated property. have change datatype , property name.

similarly propfull give property , set parts.

in case myproperty property name , string datatype. bmessage backing field property.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -