I’m teaching myself C# and writing my first program – the basics are done, but I’m not sure where to expand.

So yesterday I decided to learn C# on a whim (I tried C++ but that didn't work out). As a challenge my friend asked me to make a console clock that displays the time in the format that his worldbuilding project uses. I've made the clock, and now I'm trying to expand on it to allow for selection of the desired time zone (given in offset from standard Ekřodan time). Unfortunately, I can't figure out a way to turn the string (which would ideally be given as a value between -12 and 11) and give an output that's the offset time, formatted like this:

Current date and time in zone EKD±(offset): YYYY.MM.DD HHcMM 

The time format has its own idiosyncrasies, but that's already figured out (save for the digit padding). Ideally, I'd like a way to a) get rid of the flickering and b) allow the user to press certain keys

I've never coded anything meaningful before and have just been using the MSDN library as a reference for the TimeSpan and DateTime structures (as well as the C# yellow book). Any recommendations for my code?

[edit] is there some sort of IRC or Skype group for learning C#? I like reddit but I feel that would be a bit more engaging for learning.

by brainandforce via /r/csharp

Leave a Reply