随笔分类 -  c#

摘要:var rs1 = Assembly.LoadFrom("WindowsFormsApp1").GetType("WindowsFormsApp1.Form2"); var rs = Assembly.Load("WindowsFormsApp1").GetType("WindowsFormsApp 阅读全文
posted @ 2020-02-03 08:27 刀小爱
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; using System.Reflection; namespace Generi 阅读全文
posted @ 2020-01-28 14:10 刀小爱
摘要:static void Main(string[] args) { //string name = "ddfs" + "&&&" + "kl"; //string[] ar = new string[] { "&&&" }; // Console.WriteLine(name.Split(ar, S 阅读全文
posted @ 2020-01-28 13:49 刀小爱
摘要:string str = "123456"; MD5 md5 = new MD5CryptoServiceProvider(); byte[] fromData = System.Text.Encoding.UTF8.GetBytes(str); byte[] targetData = md5.ComputeHash(fr... 阅读全文
posted @ 2019-05-29 11:04 刀小爱 阅读(144) 评论(0) 推荐(0)
摘要:public class IniFile { // 声明INI文件的写操作函数 WritePrivateProfileString() [System.Runtime.InteropServices.DllImport("kernel32")] private static extern long WritePrivateProfil... 阅读全文
posted @ 2018-09-20 20:37 刀小爱
只有注册用户登录后才能阅读该文。
posted @ 2018-02-23 14:38 刀小爱
摘要:"../" 本地根"./"上一级"~/"服务器根 阅读全文
posted @ 2017-12-25 20:02 刀小爱
摘要:C# 特性(Attribute)之Flag特性 本文参考自C# 位域[flags],纯属读书笔记,加深记忆 [Flags]的微软解释是“指示可以将枚举作为位域(即一组标志)处理。”其实就是在编写枚举类型时,上面附上Flags特性后,用该枚举变量是既可以象整数一样进行按位的“|”或者按位的“&”操作了。 另外一个是在引用COM组件时使用,我没有用过,你可以查看MSDN 这种用处很大,比如权限... 阅读全文
posted @ 2017-10-17 10:53 刀小爱 阅读(315) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Runtime.InteropServices; using System.Text; using... 阅读全文
posted @ 2017-10-17 10:37 刀小爱 阅读(487) 评论(0) 推荐(0)
摘要:foreach (Control item in this.Controls) { if (item is TextBox) { if (item.Text.Length <= 0) { TextBox t = (TextBox)item; t.Focus(); t.BackColor = Colo 阅读全文
posted @ 2017-09-08 15:25 刀小爱 阅读(144) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading; using System.Thread... 阅读全文
posted @ 2017-07-19 16:48 刀小爱
摘要:public static class Animation { private static readonly int MoveStep = 25; private static Timer tmrAnim = null; private static Control control = null; private stat... 阅读全文
posted @ 2017-05-16 08:30 刀小爱
摘要:static public string GetMD5WithFilePath(string filePath) { FileStream file = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read); MD5CryptoServic... 阅读全文
posted @ 2017-03-11 10:54 刀小爱 阅读(133) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; namespace ConsoleApplication3 { class Program { static void Main(string[]... 阅读全文
posted @ 2016-12-07 20:42 刀小爱
摘要:public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) ... 阅读全文
posted @ 2016-11-23 09:51 刀小爱
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Th... 阅读全文
posted @ 2016-11-19 19:35 刀小爱
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.We... 阅读全文
posted @ 2016-11-09 16:45 刀小爱
摘要:需要添加 newtonsoft.json dll Per p1 = new Per(); p1.names = "zwj"; p1.zwj = "九阳神功"; //序列化 this.Text = JsonConvert.SerializeObject(p1); // 反... 阅读全文
posted @ 2016-11-05 15:14 刀小爱
摘要:.net 调用webservice 总结 最近做一个项目,由于是在别人框架里开发app,导致了很多限制,其中一个就是不能直接引用webservice 。 我们都知道,调用webserivice 最简单的方法就是在 "引用" 那里点击右键,然后选择"引用web服务",再输入服务地址。 确定后,会生成一个app.config 里面就会自动生成了一些配置信息。 现在正在做的这个项目就不能这么... 阅读全文
posted @ 2016-11-05 15:12 刀小爱
摘要:@Html.ActionLink("index", "index"); @Html.ActionLink("zwj", "zsf", new { a = "1", b = "2" }, new { id = 10 }); @Html.DropDownList("city",null,new { id="zwjk"}); @using (Html.BeginForm("dd", "bbbb", .. 阅读全文
posted @ 2016-10-27 15:16 刀小爱