Google [站内搜索]

分类: Win编程预览模式: 普通 | 列表

WebBrowser使用POST提交数据示例

WebBrowser类的Navigate方法有两个重载可用于POST提交数据:

public void Navigate(string urlString, string targetFrameName, byte[] postData, string additionalHeaders);
public void Navigate(Uri url, string targetFrameName, byte[] postData, string additionalHeaders);

调用示例:

查看更多...

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

ICSFile:重新封装C# File类

当路径D:\web\不存在时,下边两个语句都会抛错:

File.WriteAllText(@"D:\web\index.htm", "mzwu.com");
File.ReadAllText(@"D:\web\index.htm");

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3304
分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3649
分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 5679
DataGridView使用List<T>做数据源:

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

查看更多...

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

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 | 查看次数: 5314

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 | 查看次数: 14173

C#通用函数返回类型

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

查看更多...

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

WinForm快速调整控件Tab键顺序

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



查看更多...

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

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 | 查看次数: 8517