using System.Diagnostics; namespace System.Unicode { /// Provides information on a specific CJK radical. [DebuggerDisplay("{RadicalIndex} - {TraditionalRadicalCodePoint.ToString(),nq} / {SimplifiedRadicalCodePoint.ToString(),nq}")] public struct CjkRadicalInfo { private readonly byte radicalIndex; private readonly CjkRadicalData radicalData; /// The index of the radical in the Kangxi dictionary. /// There are 214 radicals, numbered from 1 to 214. public byte RadicalIndex { get { return radicalIndex; } } /// Gets a code point representing the CJK radical in its traditional form. public char TraditionalRadicalCodePoint { get { return radicalData.TraditionalRadicalCodePoint; } } /// Gets the code point of a traditional character composed only of the CJK radical. /// /// Usually, the glyph of this code point will be the same as the one used for . /// However, the code point returned will have a meaning associated, contrary to the one returned by , which only represents the radical. /// public char TraditionalCharacterCodePoint { get { return radicalData.TraditionalCharacterCodePoint; } } /// Gets a code point representing the CJK radical in its simplified form, which may be the same as the traditional form. /// Most of the time, the value returned will be the same as . public char SimplifiedRadicalCodePoint { get { return radicalData.SimplifiedRadicalCodePoint; } } /// Gets the code point of a simplified character composed only of the CJK radical. /// /// Usually, the glyph of this code point will be the same as the one used for . /// However, the code point returned will have a meaning associated, contrary to the one returned by , which only represents the radical. /// public char SimplifiedCharacterCodePoint { get { return radicalData.SimplifiedCharacterCodePoint; } } /// Gets a value indicating whether a simplified form exists for the given radical. public bool HasSimplifiedForm { get { return radicalData.HasSimplifiedForm; } } internal CjkRadicalInfo(byte radicalIndex, CjkRadicalData radicalData) { this.radicalIndex = radicalIndex; this.radicalData = radicalData; } } }