随笔分类 - .Net
摘要:1 //Lued 2 //创建的时候赋值 3 Dictionary<int, string> dict1 = new Dictionary<int, string>() { { 0, "fuck!" }, { 1, "fuck the world!" } }; 4 Console.WriteLine("dcit1:"); 5 foreach (var dict ...
阅读全文
摘要:引入命名空间。 可以实现非托管资源的释放。实现了IDisposiable的类在using中创建,using结束后会自动调用该对象的Dispose方法释放资源。相比using,close只是把文件关闭了,而没有释放其资源,释放资源的只有dispose. close只是关闭相应的连接,释放资源还是需要d
阅读全文
摘要:.NET is a free, cross-platform, open source developer platform for building many different types of applications. With .NET, you can use multiple lang
阅读全文
摘要:用什么编码方式写入就用什么编码方式读出。 文件用完了要用及时关闭,可以用 close(),IDisposable。 ReadToEnd()方法一次性读出所有内容,只适用小文件;用这个方法读大文件可能会把计算机卡死,一般读大文件一行一行读。
阅读全文