Utilities.CreateFile()
Utilities utils;
utils = new Utilities();
utils.CreateFile();
Dim utils As Utilities
utils = New Utilities
utils.CreateFile()
public class Utilities
{
static public void CreateFile()
{
}
}
public class Utilities
{
static private string InitialFileName;
static Utilities()
{
InitialFileName = "NewFile" + DateTime.Now;
}
static public void CreateFile()
{
...code using InitialFileName...
}
}
Private Shared FileName As String = String.Empty
Private Shared Version As Integer = 0
Public Shared Sub GenerateVersion()
Version += 1
FileName &= "(" & Version.ToString & ")"
End Sub
static private string FileName;
static private int Version;
static public void GenerateVersionedFile()
{
Version += 1;
FileName += "(" + Version.ToString() + ")";
}