C#中,我們一般情況下認為"+"操作符有兩種功能,一種是做算術加,一種是做字串的串連。今天看到一份文檔說,深入解析C#中兩個PLUS操作符執行的不同操作,想了想,也的確應該是這樣,IL代碼執行個體也表面這個觀點是正確的:我們先寫一小段測試代碼:namespace MSILTest{ class Program { static void Main(string[] args) { string a = "aaa";
VSTO:Visual Studio Tools for the Microsoft Office System!這幾天忽然對VBA感興趣了,就看了幾天的如何用C#操作Word,Excel的東西,發現還真的有不少的好東西啊,原來就對Word很熟練,知道很多“許多人不知道”的Word功能!可以說是一個進階使用者了。用C# 操作Word很麻煩,關鍵是參數特別多,而且不同版本的Office對應的Dll不同,而且OfficeXP 的很多函數都不同,請注意!我用的是Office2003,發現是Word11
C#裡面建立多線程,使用“Thread”類。假設Do方法有一個string參數,那麼就要使用“ParameterizedThreadStart”進行執行個體化,詳細如下。 Thread th = new Thread(new ParameterizedThreadStart(Do)); th.IsBackground=true; th.Start(your value here); 看這句代碼,如果 Do
這篇文章裡,用il語言解釋一下static方法和non-static方法在調用的時候,堆棧頂部傳遞參數的不同形式。首先看一段代碼: class TestClass { public static readonly int i = 10; static void Main(string[] args) { TestClass testClass = new TestClass();
' VB Code: which includes derived class. Imports SystemImports Donis.CSharpBookNamespace Donis.CSharpBook Public Class Starter Public Shared Sub Main Dim child as New XChild child.MethodA() child.MethodB()
These days I feel that I should pick up my english skill. From last week, I started to read many english articles and some frequent used words and sentences. This afternoon, Saturday, I open the TSS website. So fortunately, I come across a great