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
Post a Comment