using System;
public class FunctionIsAlpha
{
public static bool IsAlpha(char simbolo)
{
if ((simbolo >= 'a') && (simbolo <= 'z'))
return true;
if ((simbolo >= 'A') && (simbolo <= 'Z'))
return true;
return false;
}
public static bool IsAlpha2(char simbolo)
{
simbolo = Char.ToLower(simbolo);
if ((simbolo >= 'a') && (simbolo <= 'z'))
return true;
return false;
}
public static bool IsAlpha3(char simbolo)
{
simbolo = simbolo.ToString().ToLower()[0];
if ((simbolo >= 'a') && (simbolo <= 'z'))
return true;
return false;
}
public static bool IsAlpha4(char simbolo)
{
string validas = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqwrstuvwxyz";
if (validas.Contains(simbolo))
return true;
return false;
}
public static void Main()
{
Console.WriteLine(
IsAlpha('w'));
Console.WriteLine(
IsAlpha('2'));
}
}