Check out example codes for "C# USING SHARED CLASS". It will help you in understanding the concepts better.

Code Example 1

Private Shared FileName As String = String.Empty
Private Shared Version As Integer = 0

Public Shared Sub GenerateVersion()
  Version += 1
  FileName &= "(" & Version.ToString & ")"
End Sub

Code Example 2

Utilities.CreateFile()

Code Example 3

public class Utilities
{
  static private string InitialFileName;

  static Utilities()
  {
    InitialFileName = "NewFile" + DateTime.Now;
  }

  static public void CreateFile()
  {
    ...code using InitialFileName...
  }
}

Code Example 4

public class Utilities
{
  static public void CreateFile()
  {
  }
}

Code Example 5

Dim utils As Utilities
utils = New Utilities
utils.CreateFile()

Code Example 6

static private string FileName;
static private int Version;

static public void GenerateVersionedFile()
{
  Version += 1;
  FileName += "(" + Version.ToString() + ")";
}

Code Example 7

Utilities utils;
utils = new Utilities();
utils.CreateFile();

Learn ReactJs, React Native from akashmittal.com