Search code examples
vb.netnumber-formatting

Format numbers to roman numerals?


Is it possible to use Format function to display integers in roman numerals?

For Counter As Integer = 1 To 10
   Literal1.Text &= Format(Counter, "???")
Next

Solution

  • No, there is no standard formatter for that.

    If you read the Wikipedia on Roman numerals you'll find that there are multiple ways of formatting Roman Numerals. So you will have to write your own method our use the code of someone else.