There is a general "decomposition" of all superscript and subscript characters in .NET, as described here: How to convert super- or subscript to normal text in C#.
However, if you want to do stuff manually, and if you want just the numbers 0-9 in subscript, they can be found at U+2080 - U+2089 (http://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts).
So, you could use the C# string representation of unicode characters, \uXXXX
, and the int value of '0'
to help you.
The difference in character "numeric" values of the subscript of a number and the number in plain writing, would be:
(int) '\u2080' - (int) '0'
Putting it together, the following will probably explain it better:
using System.IO; using System;
class Program
{
static void Main()
{
var subscriptValue = (int) '\u2080';
var normalValue = (int) '0';
var diff = subscriptValue - normalValue;
Console.WriteLine("subscript value: {0}, normal value: {1}, difference: {2} ",
subscriptValue, normalValue, diff);
for (var i = normalValue; i <= (normalValue + 9); i++) {
char normal = (char) i;
char subscript = (char) (i + diff);
Console.WriteLine("Normal: {0}, subscript: {1}", normal, subscript);
}
}
}