摘要:
Essential Code to Use Regular Expression inC#using System;using System.Text.RegularExpressions; Regex phoneExp = new Regex(@"^\(\d{3}\)\s\d{3}-\d{4}$"); stringinput; Console.Write("Enter a phone numbe... 阅读全文
摘要:
System.IO.Compression是.Net 2.0里与压缩有关的命名空间,但是使用起来并不是很方便。使用第3方库ziplib可以很方便地进行压缩类的操作。 从[1]下载动态库,然后在工程里Add Reference,把ICSharpCode.SharpZipLib.dll加进去。 在代码来创建一个zip包的例子如下(摘自ziplib sample code) usingICSharpCo... 阅读全文
摘要:
#region lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor.与代码逻辑无关.Example// preprocessor_region.cs#region MyClass defin... 阅读全文
摘要:
using System;using System.Collections;namespace Project1{ class ListSystemProperties { static void Main() { System.Console.WriteLine("\tKey\t\t\tValue"); foreach (DictionaryEntry enValue in Environmen... 阅读全文
摘要:
http://www.ondotnet.com/pub/a/dotnet/2001/06/14/csharp_4_java.html1. 简单类型C#中的primitive type也是object的子类,因此可以直接调用ToString 或 GetType。 如Int是System.Int32的假名,后者继承了System.Object 注意:C#中简单类型仍然是pass-by-value2. ... 阅读全文
摘要:
7 Ontology Engineering7.1 Introduction7.2 Constructing Ontologies Manually1. main stages in the ontology development process(1). Determine scope Developing an ontology is akin to defining a set of dat... 阅读全文