In the c# String IsNormalized method returns false as soon as it encounters the first non-normalized character in a string or indicate whether this string is in a particular Unicode normalization form.
Syntax
public bool IsNormalized()
public bool IsNormalized(NormalizationForm)
Parameters
It does not take any parameter.
Return
It returns boolean.
C# String IsNormalized() Method Example
using System;
public class Program
{
public static void Main()
{
string str = "Hello, FindAndSolve!";
bool value;
value = str.IsNormalized();
// Display the data
Console.WriteLine("String is : {0}", str);
Console.WriteLine("Is str string is in normalized form?: {0}",value);
}
}
Output
String is : Hello, FindAndSolve!
Is str string is in normalized form?: True
Example 2
using System.Text;
using System;
public class Program
{ public static void Main()
{
// create and initialize string
string str = "FindAndSolve!";
Console.WriteLine("Is string str is normalized to form C - {0}",
str.IsNormalized(NormalizationForm.FormC));
Console.WriteLine("Is string str is normalized to form D - {0}",
str.IsNormalized(NormalizationForm.FormD));
Console.WriteLine("Is string str is normalized to form KC - {0}",
str.IsNormalized(NormalizationForm.FormKC));
Console.WriteLine("Is string str is normalized to form KD - {0}",
str.IsNormalized(NormalizationForm.FormKD));
}
}
Output
Is string str1 is normalized to form C - True
Is string str1 is normalized to form D - True
Is string str1 is normalized to form KC - True
Is string str1 is normalized to form KD - True