Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Razor switch statement

@switch(DateTime.Now.DayOfWeek)
{
    case DayOfWeek.Monday:
        <span>Uh-oh...</span>
		break;
	case DayOfWeek.Friday:
		<span>Weekend coming up!</span>
		break;
	case DayOfWeek.Saturday:
	case DayOfWeek.Sunday:
		<span>Finally weekend!</span>
		break;
	default:
		<span>Nothing special about this day...</span>
		break;
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to combine cells in closedXML 
Csharp :: C# oledb excel select column with space 
Csharp :: OBSERVER 
Csharp :: c# string replace multiple matches with one charactar 
Csharp :: c# arithmetic operators 
Csharp :: accord.io read .mat file 
Csharp :: unitydont play sound until finsihed 
Csharp :: unity get refresh rate 
Csharp :: google script get font color 
Csharp :: C# enum fglag 
Csharp :: how to remove a parten transform unity 
Csharp :: enum in method as argument c# 
Csharp :: c# wtssendmessage 
Csharp :: how to open or close combobox in c# 
Csharp :: parsing object from text file c# 
Csharp :: c# get buttons row and column in grid 
Csharp :: recursively fing root of tree 
Csharp :: unity create 
Csharp :: check if app have administrator rights c# 
Csharp :: c# get app FileVersion 
Csharp :: nunjucks if variable exists 
Csharp :: c# restore form 
Csharp :: unity organize variables in inspector 
Csharp :: DotNet web Api Token based Authentication 
Csharp :: dotween do rotate on one axis 
Csharp :: c# project default namespace 
Csharp :: sort number in dynamo 
Csharp :: How to use C# to open windows explorer in “select/open file mode 
Csharp :: Function delegate 
Csharp :: hacker typer.com 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =