Test
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
namespace Tag_02_Unterricht;
|
||||
|
||||
public class StatischeFelder
|
||||
{
|
||||
public string name = "Alice"; // Instanz-Variable
|
||||
public static string nachname = "Alison"; // statische Variable
|
||||
|
||||
public static void DoSomethingStatic() // statische Methode
|
||||
{
|
||||
Console.WriteLine("DoSomethingStatic");
|
||||
}
|
||||
|
||||
private void DoSomething() // Instanz-Methode
|
||||
{
|
||||
Console.WriteLine("DoSomething");
|
||||
}
|
||||
|
||||
public void DoSomethingPublic() // Instanz-Methode
|
||||
{
|
||||
DoSomething();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user