Hi rakibxl,
Please refer below code for checking upper and lower letter.
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
string value = "oRDINE";
string line = "";
int skipLine = 0;
bool a = StartLetterCheck(value);
if (a == true)
{
if (line.Replace(".", "").Trim().StartsWith("ORDINE"))
{
skipLine = 3;
}
}
else
{
if (line.Replace(".", "").Trim().StartsWith("ordine"))
{
skipLine = 1;
}
}
}
public bool StartLetterCheck(string word)
{
return Enumerable.Range(65, 26).Contains((int)word[0]);
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim value As String = "oRDINE"
Dim line As String = ""
Dim skipLine As Integer = 0
Dim a As Boolean = StartLetterCheck(value)
If a = True Then
If line.Replace(".", "").Trim().StartsWith("ORDINE") Then
skipLine = 3
End If
Else
If line.Replace(".", "").Trim().StartsWith("ordine") Then
skipLine = 1
End If
End If
End Sub
Public Function StartLetterCheck(ByVal word As String) As Boolean
Return Enumerable.Range(65, 26).Contains(CInt(Val(word(0))))
End Function