I have got a copy of C# 2010 for dummies and am making an effort to do this myself. But I am short of time so am asking for some help to improve a strategy. I want to define a day of the week from a variable entry. I have set a variable int as zdaynot ( day not to trade ) numbered 1 to 6 and am trying to convert it to a string zdow
that has been set as a default of "na". But I am unsure on my if statement and conversion of the string.
Thanks Raef

&& (Zdaynot == 1)
{Zdow = "Monday"};
&& (Zdaynot == 2)
{Zdow = "Tuesday"};
&& (Zdaynot == 3)
{Zdow = "Wednesday"};
&& (Zdaynot == 4)
{Zdow = "Thursday"};
&& (Zdaynot == 5)
{Zdow = "Friday"};
&& (Zdaynot == 6)
{Zdow = "Saturday"};
Time[0].DayOfWeek.ToString != (Zdow);


Comment