Created
May 24, 2014 14:23
-
-
Save xujiamin1216/44328a1526224acb6c4c to your computer and use it in GitHub Desktop.
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
// 其实第一眼,不用泛型不就得了吗,不进行封拆箱,我能想到是下面的 | |
class TicksToDateTimeCaller | |
{ | |
public object Call (dynamic arg) | |
{ | |
object result = null; | |
try | |
{ | |
result = new DateTime(arg); | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine(e.Message); | |
} | |
return result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment