按字母【C】检索_第41页

C#反射在实际应用中的实例代码
C#.net

C#反射在实际应用中的实例代码

2020-02-16 标签:c,反射,实际,应用,实例,代码,提供,封装,程序,模块,类型,对象,type,使用,动态,创建,绑定,现有,获取

反射提供了封装程序集、模块和类型的对象(Type 类型)。可以使用反射动态创建类型的实例,将类型绑定到现有对象,或从现有对象获取类型并调用其方法或访问其字段和属性。如果代码中使用了属性,可以利用反射对它们进行访问。下面我就以一个事例来说明反射在项目中的使用方法。大体分为三个步骤:第一步,在web.c

C#数据结构之循环链表的实例代码
C#.net

C#数据结构之循环链表的实例代码

2020-02-16 标签:c,数据结构,循环链表,实例,代码,实现,如下,public,class,node,object,element,link,n,ull,theelement,linkedlist,结点,protected

实现代码如下:public class Node{public object Element;public Node Link;public Node(){Element = null;Link = null;}public Node(object theElement){Element = the

C#索引器简单实例代码
C#.net

C#索引器简单实例代码

2020-02-16 标签:c,索引,简单,实例,代码,实现,如下,public,class,fruit,string,peach,a,round,juicy,soft,yellow,red,skin

实现代码如下:public class Fruit{string peach = "a round juicy fruit that has a soft yellow or red skin and a large hard seed in the center, or the tree that

c# 开机启动项的小例子
C#.net

c# 开机启动项的小例子

2020-02-16 标签:c,开机,启动,例子,实现,代码,如下,路径,添加,删除,public,static,void,setautorun,string,filename,bool,isautorun,registrykey

实现代码如下:  //路径, 添加开机启动/删除开机启动public static void SetAutoRun(string fileName, bool isAutoRun){RegistryKey reg = null;try{if (!System.IO.File.Exists(fileN

C#中Array与ArrayList用法及转换的方法
C#.net

C#中Array与ArrayList用法及转换的方法

2020-02-16 标签:c,array,arraylist,用法,转换,方法,区别,概述,数组,复杂,版本,提供,大多数,collections,但不,功能,例如,容量

ArrayList与Array的区别概述ArrayList 是数组的复杂版本。ArrayList 类提供在大多数 Collections 类中提供但不在 Array 类中提供的一些功能。例如:Array 的容量是固定的,而 ArrayList 的容量是根据需要自动扩展的。如果更改了 ArrayLis

c# 删除所有的空文件夹的小例子
C#.net

c# 删除所有的空文件夹的小例子

2020-02-16 标签:c,删除,所有的,空文,例子,实现,代码,如下,summary,文件系统,都将,被删,param,n,ame

实现代码如下:/// /// 删除掉空文件夹/// 所有没有子“文件系统”的都将被删除/// /// public static void KillEmptyDirectory(String storagepath){DirectoryInfo dir = new DirectoryInfo(sto

c语言读取obj文件转换数据的小例子
C/C++

c语言读取obj文件转换数据的小例子

2020-02-16 标签:c,语言,读取,obj,文件,转换,数据,例子,实现,代码,如下,hello,cpp,defines,entry,point,console,application,include,stdafx

实现代码如下:// hello.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "stdio.h"int _tmain(int argc, _TCHAR* argv[]){

C#实现的最短路径分析
C#.net

C#实现的最短路径分析

2020-02-16 标签:c,实现,最短,路径分析,代码,如下,using,system,collections,generic,linq,text,n,amespace,class,program,static,int

实现代码如下:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 {class Program{static int l

C#控制台输出进度和百分比的实例代码
C#.net

C#控制台输出进度和百分比的实例代码

2020-02-16 标签:c,控制台,输出,进度,百分比,实例,代码,实现,如下,using,system,collections,generic,linq,text,n,amespace,class

实现代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 {class Program{static void

C# 手动/自动保存图片的实例代码
C#.net

C# 手动/自动保存图片的实例代码

2020-02-16 标签:c,手动,自动,保存,图片,实例,代码,view,plaincopy,实现,如下,private,void,savebtn,click,object,sender,system,eventargs

view plaincopy to clipboardprint?实现代码如下://手动保存图片private void saveBtn_Click(object sender, System.EventArgs e){bool isSave = true;SaveFileDialog saveIm