Select Condition

Saranya Boopathi
Posted by Saranya Boopathi under VB.NET category on | Points: 40 | Views : 743
Select Condition using case:

Dim weekday=DateTime.Now.DayOfWeek
Dim day=weekday.ToString()
Dim message=""
End Code
@Select Case day
Case "Monday"
message="This is the first weekday."
Case "Thursday"
message="Only one day before weekend."
Case "Friday"
message="Tomorrow is weekend!"
Case Else
message="Today is " & day
End Select

Comments or Responses

Login to post response