Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
26
Task/Classes/C-sharp/classes.cs
Normal file
26
Task/Classes/C-sharp/classes.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
public class MyClass
|
||||
{
|
||||
public MyClass()
|
||||
{
|
||||
}
|
||||
public void SomeMethod()
|
||||
{
|
||||
}
|
||||
private int _variable;
|
||||
public int Variable
|
||||
{
|
||||
get { return _variable; }
|
||||
set { _variable = value; }
|
||||
}
|
||||
public static void Main()
|
||||
{
|
||||
// instantiate it
|
||||
MyClass instance = new MyClass();
|
||||
// invoke the method
|
||||
instance.SomeMethod();
|
||||
// set the variable
|
||||
instance.Variable = 99;
|
||||
// get the variable
|
||||
System.Console.WriteLine( "Variable=" + instance.Variable.ToString() );
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue