From http://www.cnblogs.com/jiejie_peng/archive/2010/04/08/1707195.html
C #3.0 new feature-Expansion Method
Main PurposeMeasure the test taker's knowledge about the extension of a compiled class method.
Special noteA. When a class is
Create txtsrcfname in the text box, design its allowdrop to true, and process the dragenter and dragdrop events.
1 Private Void Txtsrcfname_dragenter ( Object Sender, drageventargs E) 2 { 3 If (E. Data. getdatapresent (dataformats.
1 Using System; 2 Using System. Collections. Generic; 3 Using System. componentmodel; 4 Using System. Data; 5 Using System. drawing; 6 Using System. LINQ;7 Using System. text; 8 Using System. Windows. forms; 9 Using Javesystem; 10
Event:
"When other classes or objects are concerned, classes or objects can be notified through events. The class for sending (or triggering) events is called "publisher", and the class for accepting (or processing) events is called "subscription "
Some of unity3d's compile-based methods can only be used in JS, And it is ineffective in C #, while C # can communicate with the server side, and JS itself won't work. Therefore, we will encounter mutual use of these two methods in the plain text.
sitemaps is a Google tool related to website administrators. It is similar to the RSS function of blog and is a convenient service, if everyone uses this method to submit their own updates, Google will no longer need to send so many crawlers to go
1. datetime numeric type system. datetime currenttime = new system. datetime ();
1.1 take the current year, month, day, hour, minute, second currenttime = system. datetime. now;
1.2 take the current year int year = currenttime. Year;
1.3 The
Preface
This conversion is actually very simple. The most important thing is to reference the class library first. You can go to the official website to download reference http://json.codeplex.com.
Two days ago, I learned how to submit JSON
16. Two new usage methods
Instantiate object new class (); hide the base class method, that is, override method public new XXX (){}
17. Delegate and event usage
Public Delegate void handles (); // defines the delegate. the return value is void
GUID (globally unified identifier) refers to the number generated on a machine, which ensures that all machines in the same time and space are unique. Generally, the platform provides APIs for generating guids. GenerateAlgorithmIt is interesting to
=== Program that uses streamreader [C #] ===
Using system;Using system. IO;
Class Program{Static void main (){//// It will free resources on its own.//String line;Using (streamreader reader = new streamreader ("file.txt ")){Line = reader.
Override and overload)
Similar: They all redefine the implementation process of a method.
Differences:Override: indicates the re-implementation of a method between objects. When a class inherits a class, when a method in the base class is
Puzzle 34: knocked down by counting
This
Program What will it print?
Class count
{
Static void main ()
{
Const int start = 2000000000;
Int COUNT = 0;
For (float F = start; F Count ++;
System. Console. writeline (count );
}
}
Confused 34: knocked
Http://c.chinaitlab.com/news/765389.html
1. Take C ++ as a new language learning (it has nothing to do with C! True .);2. Read thinking in C ++ instead of C ++.3. read "The C ++ programming language" and "inside the C ++ object model". Do not read
Http://blog.csdn.net/lzx_bupt/article/details/6913151
Recently, I like to hear old songs from universities. Deutschland was popular during the World Cup in Germany. It is said that it is not a theme song, but it is more popular than the theme song.
Instance:Class Program
{
Static void Main (string [] args)
{
DelegateEvent de = new DelegateEvent ();
De. Do ();
Console. Read ();
}
}
Class DelegateEvent
{
Public void Do (){
FangDiChanPublisher fdc = new FangDiChanPublisher ();
BuyerSubscriber
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Using System;
Using System. Collections. Generic;
Using System. Text;
Using System. Xml;
Using System. Net;
Using System. IO;
Namespace BLL
{
Public
1 c # process-related sorting234. What is the process username obtained based on the process name?56. Add a reference to System. Management. dll.78 using System. Diagnostics;9 using System. Management;1011 static void Main (string [] args)12 {13
1 // obtain the first letter of a Chinese character2 private string GetChineseSpell (string strText)3 {4 int len = strText. Length;5 string myStr = "";6 for (int I = 0; I 7 {8 myStr + = getSpell (strText. Substring (I, 1 ));9}10 return myStr;11}12 //
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service