
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Char.IsSymbol() Method in C#
The Char.IsSymbol() method in C# is indicating whether the character at the specified position in a specified string is categorized as a symbol character.
Syntax
public static bool IsSymbol (string str, int index);
Above, str is a string, whereas the position of the character to evaluate in str.
Let us now see an example to implement the Char.IsSymbol() method −
Example
using System; public class Demo { public static void Main(){ bool res; char val = 'P'; Console.WriteLine("Value = "+val); res = Char.IsSymbol(val); Console.WriteLine("Is the value a symbol? = "+res); } }
Output
This will produce the following output −
Value = P Is the value a symbol? = False
Let us see another example −
Example
using System; public class Demo { public static void Main(){ bool res; char val = '+'; Console.WriteLine("Value = "+val); res = Char.IsSymbol(val); Console.WriteLine("Is the value a symbol? = "+res); } }
Output
This will produce the following output −
Value = + Is the value a symbol? = True
Advertisements