Google [站内搜索]

分类: Win编程预览模式: 普通 | 列表
分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2996
分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4910
DataGridView使用List<T>做数据源:

List<Person> people = new List<Person>();
//todo
dataGridView1.DataSource = people;

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 6846
先看一个栗子:

JavascriptSerializer serializer = new JavascriptSerializer();
DateTime now = DateTime.Parse("2015-01-23 00:00:00");
Console.WriteLine(serializer.Deserialize<DateTime>(serializer.Serialize(now)));

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4646

C# DateTime去掉时分秒几种方法

DateTime now = DateTime.Parse("2015/01/23 13:50:00");

Console.WriteLine(now.Date); //去掉时分秒,返回DateTime
Console.WriteLine(now.ToShortDateString()); //去掉时分秒,返回string
Console.WriteLine(now.ToString("d")); //去掉时分秒,返回string

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 13344

C#通用函数返回类型

/// <summary>
/// 通用函数返回类型
/// </summary>
/// <typeparam name="T"></typeparam>
public class TodoResult<T> where T : class

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3115

WinForm快速调整控件Tab键顺序

WinForm有时需调整控件Tab键顺序以方便操作,一个一个控件修改TabIndex属性值很麻烦,在Visual Studio菜单选择"视图→Tab键顺序"可快速调整Tab键顺序:



查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4095

Entity Framework各版本历史记录

EF 6.1.2
EF6.1.2 is mostly about bug fixes, you can see a list of the fixes included in EF6.1.2 on our CodePlex site.
We also accepted a couple of noteworthy changes from members of the community:
    ·Query cache parameters can be configured from the app/web.configuration file
    <entityFramework>  

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 7668

Entity Framework 6连接Sqlite数据库示例

第一步:在NuGet安装System.Data.Sqlite程序包



第二步:生成实体类

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 5412

NuGet安装旧版本程序包的方法



NuGet默认只能安装最新版本程序包,如果需要旧版本程序包,只能通过程序包管理控制台来安装:

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4504