Sunny's Technology Blog

书山有路勤为径,学海无涯苦作舟

博客园 首页 新随笔 联系 订阅 管理

文章分类 -  C# 基础知识

摘要:Word.Application myApp = new Word.ApplicationClass(); Word.Document myWord = new Word.DocumentClass(); myApp = myWord.Sections.Application; myWord.Acti... 阅读全文
posted @ 2007-11-01 20:55 Sunny 阅读(753) 评论(0) 推荐(0)

摘要:using System;using System.Reflection;using System.Configuration;namespace WinApp_CSharp{ /**//// /// ProgramEntrance 的摘要说明。 /// public class ProgramEntrance { /**///// ... 阅读全文
posted @ 2006-04-14 16:39 Sunny 阅读(258) 评论(0) 推荐(0)

摘要:using System; using System.Text; using System.Globalization; using System.Security.Cryptography; using System.Windows.Forms; namespace Encrypts { public class EncryptClass { /**//// ... 阅读全文
posted @ 2006-04-12 12:14 Sunny 阅读(1957) 评论(0) 推荐(0)

摘要:引入: 事件的定义的关键字就是一个委托:EventHandler 带事件的一个类: using System;using System.Collections.Generic;using System.Text;namespace WinApp_Test.BusinessFacade{ class ClassWithEvents { public int max; ... 阅读全文
posted @ 2006-03-31 21:36 Sunny 阅读(296) 评论(0) 推荐(0)

摘要:Public Class mainClass main Public Shared Sub main()Sub main() '定义出错机制线程 '其实就是一个多线程,在程序运行过程中,此 AddHandler Application.ThreadException, AddressOf OnThreadException Applic... 阅读全文
posted @ 2006-03-28 16:24 Sunny 阅读(406) 评论(0) 推荐(0)

摘要:对于一个项目,我们希望有不同的语言版本,对于这种需求,我们可以将界面上所有的文本框文本和图片的信息保存在一些配置文件中,通过程序运行过程中的参数,进行动态加载。 在.net下面(是结合winform来说的),实现国际化的方式有四种 –借助于config文件 –借助于ini文件 –借助于txt文件 –借助于resources文件(推荐) 借助于config文件 使用config文件方式需要注意... 阅读全文
posted @ 2006-03-28 16:20 Sunny 阅读(498) 评论(0) 推荐(0)

摘要:// inherit04.cs - Virtual Methods//===============================================using System;class Person{ protected string firstName; protected string lastName; public Person() { ... 阅读全文
posted @ 2005-08-15 15:22 Sunny 阅读(167) 评论(0) 推荐(0)

摘要:using System;using System.Text;//基类class Person{ protected string firstName; protected string middleName; protected string lastName; private int age; public Person() { } p... 阅读全文
posted @ 2005-08-15 14:31 Sunny 阅读(6414) 评论(0) 推荐(0)

摘要:1.结构 //使用构造函数 SUM structA = new SUM(1,2); //重新修改值 structA.x = 3; structA.y = 4; int Count = structA.DoSUM(); //定义一个结构体,包含构造函数... 阅读全文
posted @ 2005-08-15 11:01 Sunny 阅读(1310) 评论(0) 推荐(0)

摘要:1.属性 string pstr = String.Empty; public string str { get { return this.pstr; } set { this.ps... 阅读全文
posted @ 2005-08-15 09:30 Sunny 阅读(330) 评论(0) 推荐(0)