c#
string str = "MyString";
Console.WriteLine(str.Substring(0, str.Length - 3));
vb.net
dim str as string = "MyString"
Console.WriteLine(str.Substring(0, str.Length - 3))
vb.net (with VB6 style functions)
dim str as string = "MyString"
Console.WriteLine(Mid(str, 1, len(str) - 3))