This snippet let’s you use the Left, Right, Mid methods known from VisualBasic in C# without referencing Microsoft.VisualBasic Namespace.
public static string Left(string input, int index) { return input.Substring(0, index); } public static string Right(string input, int index) { return input.Substring(input.Length - index, index); } public static string Mid(string input, int startingIndex, int endingIndex) { return input.Substring(startingIndex, endingIndex); } public static string Mid(string input, int startingIndex) { return input.Substring(startingIndex); }
RT @CodeSnippetsNET: Left, Right, Mid methods for C# http://t.co/bwmyWNtyWq #csharp #visualbasic #dotnet #visualstudio #programming #code #…
RT @CodeSnippetsNET: Left, Right, Mid methods for C# http://t.co/bwmyWNtyWq #csharp #visualbasic #dotnet #visualstudio #programming #code #…
RT @CodeSnippetsNET: Left, Right, Mid methods for C# http://t.co/bwmyWNtyWq #csharp #visualbasic #dotnet #visualstudio #programming #code #…