Jon Skeet [C# MVP] skrev:
The easiest thing would be to call Convert.FromBase64String and catch
the FormatException. It's not terribly nice, and will be inefficient if
you have *lots* of these strings to convert, but it's reasonable for a
one-off. It's likely to be more reliable than writing your own
implementation.
It is easier to force it as a requirement from the supplier of the string..
It it not worth the time guessing what a input field is.