Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
28
Task/Classes/PowerShell/classes-1.psh
Normal file
28
Task/Classes/PowerShell/classes-1.psh
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
Add-Type -Language CSharp -TypeDefinition @'
|
||||
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