c sharp substring
// To get a substring of a string use 'Substring()'
// The first value is the index of where to start and the second
// value is the lenght of the substring.
string str = "Hello World!"
str.Substring(3, 4) // Output: "lo W"
// If you only give a starting index, it will go until the end
str.Substring(3) // Output: "lo World!"using System;
class HellWorld {
// Main Method
public static void Main()
{
// define string
String str = "Let us code";
Console.WriteLine("String : " + str);
// retrieve the substring from index 5
Console.WriteLine("Sub String1: " + str.Substring(5));
// retrieve the substring from index 8
Console.WriteLine("Sub String2: " + str.Substring(8));
}
}
Also in C#:
- unity how to move an object
- c# reverse array
- unity fall damage c#
- c# get every point in a line in matrix
- unity vector3 to array
- count number of enum values C#
- c# keyvaluepair
- c# getter setter
- unity addforceatposition
- unity assign button onclick
- read embedded resource c# xml
- godot c# move towards
- mvc c# w3schools
- debug.log
- c# round number up
- c# how to add newline on text box
- list c#
- how to join array indexes with comma in c#
- prompt for array unity c# editor scripting
- unity set material
- 2d object look at object
- button color uwp c#
- non null array length
- formula calculating distance coordinates latitude longitude c#