Top 10 reads of July 2015

These are our Top 10 reads of July 2015.

  • How to match strings using wildcards in C# and VB.NET
  • IsSmallerThan generic extension method for C# and VB.NET
  • How to prevent your IOS app from going into sleeping mode using Objective-C
  • How to convert Color to Hex and Hex to Color using C# and VB.NET
  • How to read a embedded resource to String in C# and VB.NET
  • How to convert a Securestring to String using C# and VB.NET
  • How to change the encoding of a String using C# and VB.NET
  • How to get focusedrow cell value using Devexpress XtraGrid in C# and VB.NET
  • How to get the selected row index in Devexpress Xtragrid Control using C# and VB.NET
  • thanks to all visitors, bookmark us, share us, talk about us, Follow us!, Like us! let’s grow bigger! You can even participate in our Github Projects!

    Left, Right, Mid methods for C#

    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);
    }