Last active
February 27, 2020 16:03
-
-
Save DorukUlucay/c98a8f96971dbe7de1f2c16c8ce1916a to your computer and use it in GitHub Desktop.
from so
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://stackoverflow.com/a/290265/1397858 | |
private static readonly DateTime Jan1st1970 = new DateTime | |
(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
public static long CurrentTimeMillis() | |
{ | |
return (long) (DateTime.UtcNow - Jan1st1970).TotalMilliseconds; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (var line in File.ReadLines("test.txt")) | |
{ | |
//do stuff here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://stackoverflow.com/a/16072742/1397858 | |
byte[] bytes = Encoding.ASCII.GetBytes(someString); | |
string someString = Encoding.ASCII.GetString(bytes); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment