variables - Using parameter in constructors C# -


i'm abit new in c#. have code this:

namespace example {     public partial class example_setting : form     {         public example_setting(string somethings)         {         }         private myplace()         {              messagebox.show(somethings);         }     } 

i don't know how value of somethings variable in myplace().how can do?

an example be:

namespace example {     public partial class example_setting : form     {         string somethings; // <-- declare variable in class         public example_setting(string somethings)         {               this.somethings = somethings; // save param variable         }         private myplace()         {              messagebox.show(somethings); // data here use         }     } 

Comments

Popular posts from this blog

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -