Uri.IsHexEncoding(String, Int32) Method is used to check whether a character in a string is hexadecimal encoded or not. This checks for hexadecimal encoding which follows the pattern “%hexhex” in a string, where “hex” is a digit from 0 to 9 or a letter from A-F (case-insensitive).
Syntax: public static bool IsHexEncoding (string pattern, int index);
pattern: It is the string to check.
index: It is the location in pattern to check for hexadecimal encoding.
Return Value: This method returns a Boolean value that is true if pattern is hexadecimal encoded at the specified location otherwise, false.
Below programs illustrate the use of Uri.IsHexEncoding(String, Int32) Method:
%75 is a valid Hexadecimal Encoded
%65 is a not valid Hexadecimal Encoded %75 is a valid Hexadecimal Encoded %55 is a valid Hexadecimal Encoded
- Difference between Method Overriding and Method Hiding in C#
- C# | Math.Abs() Method | Set - 1
- C# | Math.Exp() Method
- Decimal.Add() Method in C#
- C# | Method Overloading
- Queue.Contains() Method in C#
- C# | Math.Pow() Method
- DateTime.Add() Method in C#
- Main Method in C#
- C# | SortedDictionary.Add() Method
- C# | Join Method | Set - 2
- C# | Join() Method | Set - 1
- C# | PadLeft() Method
- DateTimeOffset.Add() Method in C#
- TimeSpan.Add() Method in C#
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.