datetime - what this line do in c# -


i want understand line in c#,

int32 dayofweekindex = (int32)datetime.now.dayofweek + 1; 

what return example if run today ?

i not have option run code.

it depends on in world , computer clock set to.

it returns value of dayofweek enum corresponding time run, plus 1. sunday 0, saturday 6.

so, thursday, dayofweekindex 5.


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -