Javatpoint.com is changed to TpointTech.com
C# String Remove()The C# Remove() method is used to get a new string after removing all the characters from specified beginIndex till given length. If length is not specified, it removes all the characters after beginIndex. SignatureParameterindex: it is an integer type parameter. ReturnIt returns a string. C# String Remove() Method ExampleOutput: He C# String Remove() Method Example 2Output: abcdjk Next TopicC# String Replace() |
Javatpoint.com is now changed to TpointTech.com, so we request you to subscribe our newsletter for further updates.
C# The C# TrimEnd() method is used to remove all trailing occurrences of a set of characters specified in an array from the current String object. Signature public string TrimEnd(params Char[] ch) Parameter ch: It takes a char array as parameter. Return It returns a string. C# Method Example using System; ...
1 min read
C# The C# Insert() method is used to insert the specified string at specified index number. The index number starts from 0. After inserting the specified string, it returns a new modified string. Signature public string Insert(Int32 first, String second) Parameters first: It is used to pass as an...
1 min read
C# The C# PadRight() method is used to get a new string that left-aligns the characters in this string by padding them with spaces on the right, for a specified total length. Signature public string PadRight(Int32 length) public string PadRight(Int32, Char) Parameter length: it is an integer type parameter. Return It returns...
1 min read
C# The C# GetHashCode() method is used to get hash code of this string. It returns an integer value. Signature public override int GetHashCode() Parameters It does not take any parameter (argument). Return It returns hash code of a string object. C# Method Example using System; public...
1 min read
C# The C# CompareOrdinal() method compares two specified String objects by evaluating the numeric values of the corresponding Char objects in each string. If both strings are equal, it returns 0. If first string is greater than second string, it returns positive number in difference else it...
2 min read
C# The C# Replace() method is used to get a new string in which all occurrences of a specified Unicode character in this string are replaced with another specified Unicode character. There are two methods of Replace() method. You can replace string also. Signature public string Replace(Char first, Char...
2 min read
C# The C# Equals() method is used to check whether two specified String objects have the same value or not. If both strings have same value, it return true otherwise false. In other words, it is used to compare two strings on the basis of content. Signature public bool...
1 min read
C# The C# Concat() method is used to concatenate multiple string objects. It returns concatenated string. There are many overloaded methods of Concat(). Signature public static string Concat(String, String) public static string Concat(IEnumerable<String>) public static string Concat(Object) public static string Concat(Object, Object) public static string Concat(Object, Object, Object) public static string Concat(Object, Object,...
1 min read
C# The C# ToCharArray() method is used to get character array from a string object. Signature public char[] ToCharArray() public char[] ToCharArray(Int32, Int32) Parameter First method does not take any parameter while second method takes two integer parameters. Return It returns a character array. C# Method Example using System; ...
1 min read
C# The C# Trim() method is used to remove all leading and trailing white-space characters from the current String object. Signature public string Trim() public string Trim(params Char[]) Parameter First method does not take any parameter. Second method takes a char array as parameter. Return It returns a string. C# Method Example ...
1 min read
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India