- 博客(12)
- 收藏
- 关注
转载 查找所有 实现某一接口的类,并调用类所实现的接口的方法来实现简单的反射
/// <summary>///先定义需要被继承的 接口/类/// </summary>public interface IHumanGeneral{ /// <summary> /// 调用接口需要实现的方法 /// </summary> void Execute();}/// <summary...
2019-01-18 10:32:02
940
原创 c#--多线程常用方法
static void Main() { Console.WriteLine("开始"); #region -- 多线程测试实例 关键字:Thread(using System.Threading) //无参数的委托 (textFunction:无参数的方法 textFunction()) ...
2018-10-24 14:39:42
363
转载 c#--常用方法(文件操作、外部接口请求、json与对象的相互转换、Dictionary字典常用功能等)
1.1、文件及目录的创建、删除、copy、移动等操作//文件目录DirectoryInfo TheFolder = new DirectoryInfo("c:\\Test");//判断目录是否存在if(!TheFolder.Exists){ //创建目录 directoryInfo.Create();}//遍历当前文件夹中的子目录foreach(Direct...
2018-10-22 17:44:10
879
原创 C#上传图片或文件到七牛云并返回当前图片或文件的外链地址
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Qiniu;using Qiniu.IO;using Qiniu.IO.Model;using Qiniu.RS;using Qiniu.Util;...
2018-10-22 17:09:31
1709
转载 c#,利用个推实现APP消息推送
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Google.ProtocolBuffers;using com.gexin.rp.sdk.dto;using com.igetui.api.openservice;using com.igetui.api.o
2018-01-24 11:23:56
5697
2
转载 c#对钉钉的部门/成员的各项操作
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Text;using System.Web;using System.Web.Script.Serialization;namespace imgFileUpL
2018-01-24 11:10:27
1990
1
转载 c#获取AD域信息
using System;using System.Collections.Generic;using System.DirectoryServices;using System.DirectoryServices.AccountManagement;using System.Linq;using System.Net.NetworkInformation;using System.T
2018-01-24 10:52:05
2972
转载 c#中接口和类的有什么异同,c#中的委托是什么?事件是不是一种委托?事件和委托的关系
接口是负责功能的定义,通过接口来规范类,类是负责具体功能的具体实现异:不能直接实例化接口,接口不包含方法的实现,类只能从一个基类进行实现,同:接口,类和结构可以从多个接口继承,继承接口的任何非抽象类型都必须实现接口的所有成员,接口可以包含事件,索引器,方法和属性,一个类可以实现多个接口委托是一个类,是一种在对象里保存方法引用的类型,同时也是一种类型安全的函数指针,他定义了方
2017-09-21 22:24:27
1146
转载 StringBuilder和String的区别
String在进行运算时,如赋值,拼接等,会产生一个新的实例,而stringBuilder则不会。String创建一个不可改变的对象,StringBuilder创建一个可以改变的对象stringBuilder实在System.text命名空间下,提供Append方法
2017-09-21 22:23:19
274
转载 1.asp.net中的错误机制
1,page_Error事件 捕获一种在页面级别出现错误的方法 2,error_page属性 在页面设置error属性从而确定页面发生错误时指向那个页面 要在配置中mode属性必须设置为no 3,APPlocation_Error事件 可以捕获发生在应用程序中的错误, 4,配置项 可将重定向页指定为默认的错误页defaultredirect或根据引发的HTTP错误代码指定
2017-09-21 22:21:36
342
转载 产生一个int数组,长度为100,并向其中随机插入1-100,并且不能重复
产生一个int数组,长度为100,并向其中随机插入1-100,并且不能重复的两种方法方法1:Int [] i =new int[100];Pendom p = new Pendpm();Int j=0;//方法1 利用indexofWhere(j<100){ Int a=p.Next(1,101); If(Array.IndexOf(i,a)) { I[j]=a;
2017-09-21 22:15:20
1841
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人