???????д?????????
???????????? ???????[ 2013/7/1 14:08:05 ] ????????
??????????????????????????????
????1??????API????????????÷?????????????????????????????????
????2?????????????????????????????????ο???
????Lambda????????????????????????????????????????????????ο?????????????
[TestMethod]
public void TraceTestMethod()
{
Expression<Func<DateTime>> expr = () => DateTime.Now.AddDays(1);
Func<DateTime> tomorrow = expr.Compile();
Console.WriteLine(tomorrow());
}
??????????????????????????????裬??????????????????????????С?
???????????????????????????????????????????????
[TestMethod]
public void ByteTest()
{
var kb = 1.KB();
var mb = 1.MB();
var gb = 1.GB();
var tb = 1.TB();
}
??????????????У????????????????????????
/// <summary>
/// Kilobytes
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static int KB(this int value)
{
return value * 1024;
}
/// <summary>
/// Megabytes
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static int MB(this int value)
{
return value.KB() * 1024;
}
/// <summary>
/// Gigabytes
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static int GB(this int value)
{
return value.MB() * 1024;
}
/// <summary>
/// Terabytes
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static long TB(this int value)
{
return (long)value.GB() * (long)1024;
}
???????????????????д????????????????????????????????????
????Visual Studio??????????????????????к????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????У????????????????????·??????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11