You can index into a string in C# like an array, and you get the character at that index.
Example:
In Java, you would say
str.charAt(8);
In C#, you would say
str[8];
Related Posts:
- Is there an equivalent to the Scanner class in C# for strings?
- How can I convert String to Int?
- Convert int to string?
- Converting string to byte array in C#
- How can I add ” character to a multi line string declaration in C#?
- C# Java HashMap equivalent
- C# Java HashMap equivalent
- C# List
to string with delimiter - Convert a list of strings to a single string
- C#: how to get first char of a string?
- How to initialize a list of strings (List
) with many string values - What does {0} mean when found in a string in C#?
- C# – Illegal characters in path
- Getting The ASCII Value of a character in a C# string
- How to round up the result of integer division?
- How can I fix the error : “Unreachable Code Detected”
- C# – How to convert string to char?
- Escape double quotes in a string
- Creating a comma separated list from IList
or IEnumerable - Fastest way to remove first char in a String
- Checking if a string array contains a value, and if so, getting its position
- Substring index and length must refer to a location within the string
- Case insensitive ‘Contains(string)’
- Most efficient way to remove special characters from string
- Adding a newline into a string in C#
- How to format a string as a telephone number in C#
- How to convert UTF-8 byte[] to string
- .NET String.Format() to add commas in thousands place for a number
- How would you count occurrences of a string (actually a char) within a string?
- How can we prepend strings with StringBuilder?
- What is a quick way to force CRLF in C# / .NET?
- Check if a string is a palindrome
- Convert string to decimal, keeping fractions
- C++ performance vs. Java/C#
- Convert JSON String to JSON Object c#
- Convert an array to string
- Unrecognized escape sequence for path string containing backslashes
- Reverse a string in Java
- How to find child of a GameObject or the script attached to child GameObject via script
- Process cannot access the file because it is being used by another proess
- How to check if a String contains another String in a case insensitive manner in Java?
- How to replace � in a string
- Unity OnTriggerEnter2D not registering
- How to Sort a List
by a property in the object - The page was not displayed because the request entity is too large on IIS
- How to split a string in Java
- Extension methods must be defined in a non-generic static class
- Left Hand Side of an Assignment must be a Variable CharAt
- Return multiple values to a method caller
- Regex that accepts only numbers (0-9) and NO characters
- Fire ontextchanged() event of an asp:TextBox via Javascript
- C# Gridview CheckBox Field VS (Template Field + CheckBox)
- Extension methods must be defined in a non-generic static class
- What is Java String interning?
- Convert char to int in C#
- The remote server returned an error: (403) Forbidden
- How to add a delay for a 2 or 3 seconds
- calling javascript function on OnClientClick event of a Submit button
- Process exists with ExitCode 255
- The data types text and varchar are incompatible in the equal to operator in C#
- Name does not exist in the current context
- Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host
- The remote server returned an error: (407) Proxy Authentication Required
- IsNumeric function in c#
- The calling thread must be STA, because many UI components require this in WPF
- Error when Building Project: Error building Player because scripts have compile errors in the editor
- The server committed a protocol violation. Section=ResponseStatusLine ERROR
- Specified cast is not valid.. how to resolve this
- C# switch on type
- How to post JSON to a server using C#?
- C# Error (Cannot Implicitly convert type ‘string’ to ‘int’)
- EF CodeFirst: Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong
- How can I cast int to enum?
- What is the C# equivalent of friend?
- How to get relative path of a file in visual studio?
- Make first letter of a string upper case (with maximum performance)
- ‘An exception occurred during a WebClient request” while using C# ASP.NET
- How to download image from URL
- Visual Studio keeps crashing
- The opposite of the modulo operator?
- How can I implement static methods on an interface?
- How to add List<> to a List<> in asp.net [duplicate]
- get path for my .exe
- How to convert a String into an ArrayList?
- OnCollisionEnter is not called in unity
- The name ‘ViewBag’ does not exist in the current context – Visual Studio 2015
- How to create a new object instance from a Type
- Append a single character to a string or char array in java?
- does not implement interface member
- Differences between SFTP and “FTP over SSH”
- When should I use a List vs a LinkedList
- Remove punctuation from string with Regex
- Why cannot cast Integer to String in java?
- Is there a keyboard shortcut to maximize the Game window in Unity in Play Mode?
- IF Statement multiple conditions, same statement
- What is the easiest way to handle associative array in c#?
- What does the M stand for in C# Decimal literal notation?
- Iif equivalent in C#
- is inaccessible due to its protection level
- In Java, how do I parse XML as a String instead of a file?