c# extension visual studio code code example
Example 1: how to make a C# application visual studio code
mkdir MyApp; cd MyApp;
dotnet new console
Example 2: c# extension
public static class MyClassExtension
{
// This is the method you are adding to a class "MyClass"
public static string GetValue(this MyClass myClass)
{
return value.toString();
}
}
// This is how you can use it in other parts of your code
MyClass myClass = new MyClass();
string s = myClass.GetValue();