CSharp examples for System:Char
Gets the char in a string from a starting position plus the index
using System.Text.RegularExpressions; using System.Text; using System.Globalization; using System.Collections.Generic; using System;//from ww w . jav a 2 s. co m public class Main{ //Gets the char in a string from a starting position plus the index //string, 3, 1 -> n public static char CharMid(string input, int startingIndex, int countIndex) { if (startingIndex + countIndex < input.Length) { string str = input.Substring(startingIndex + countIndex, 1); return str[0]; } return new char(); } }