摘要:Word.Application myApp = new Word.ApplicationClass(); Word.Document myWord = new Word.DocumentClass(); myApp = myWord.Sections.Application; myWord.Acti...
阅读全文
文章分类 - C# 基础知识
摘要:using System;using System.Reflection;using System.Configuration;namespace WinApp_CSharp{ /**//// /// ProgramEntrance 的摘要说明。 /// public class ProgramEntrance { /**///// ...
阅读全文
摘要:using System; using System.Text; using System.Globalization; using System.Security.Cryptography; using System.Windows.Forms; namespace Encrypts { public class EncryptClass { /**//// ...
阅读全文
摘要:引入: 事件的定义的关键字就是一个委托:EventHandler 带事件的一个类: using System;using System.Collections.Generic;using System.Text;namespace WinApp_Test.BusinessFacade{ class ClassWithEvents { public int max; ...
阅读全文
摘要:Public Class mainClass main Public Shared Sub main()Sub main() '定义出错机制线程 '其实就是一个多线程,在程序运行过程中,此 AddHandler Application.ThreadException, AddressOf OnThreadException Applic...
阅读全文
摘要:对于一个项目,我们希望有不同的语言版本,对于这种需求,我们可以将界面上所有的文本框文本和图片的信息保存在一些配置文件中,通过程序运行过程中的参数,进行动态加载。 在.net下面(是结合winform来说的),实现国际化的方式有四种 –借助于config文件 –借助于ini文件 –借助于txt文件 –借助于resources文件(推荐) 借助于config文件 使用config文件方式需要注意...
阅读全文
摘要:// inherit04.cs - Virtual Methods//===============================================using System;class Person{ protected string firstName; protected string lastName; public Person() { ...
阅读全文
摘要:using System;using System.Text;//基类class Person{ protected string firstName; protected string middleName; protected string lastName; private int age; public Person() { } p...
阅读全文
摘要:1.结构 //使用构造函数 SUM structA = new SUM(1,2); //重新修改值 structA.x = 3; structA.y = 4; int Count = structA.DoSUM(); //定义一个结构体,包含构造函数...
阅读全文
摘要:1.属性 string pstr = String.Empty; public string str { get { return this.pstr; } set { this.ps...
阅读全文
浙公网安备 33010602011771号