• Got a Tipila, google, windows live or facebook account ?
Tips tagged: net
1
votes
Use following methods to read a text file in c# 1. using (StreamReader sr = File.OpenText(FILE_NAME)) { String input; while ((input = sr.ReadLine()) != null) { Console.WriteLine(input); } Console.WriteLine ("The end of the stream has been reached."); } 2 string text = System.IO.File.ReadAllText(@"C:\Users\Public\TestFo ...
1
votes
Use the following code to get the current time zone in the GMT + XX:XX format zone gives the time zone string zone = string.Empty; if (TimeZoneInfo.Local.BaseUtcOffset.TotalMinutes == 0) zone = " GMT"; else if (TimeZoneInfo.Local.BaseUtcOffset.TotalMinutes > 0) zone = " GMT + " + Math.Abs(TimeZoneInfo.Local.BaseUtcOffs ...
2
Matching Tips
Search options
  • Use the syntax:
    seach text, tag1, tag2,...
    to search for tips with the given tags.
  • Add ,mytips to the search text to search within MyTips only.
  • Use the syntax:
    ,tag1, tag2,...  to get all tips with the given tags.
Related Tags
Login to Tipila