C # delegation and events

C # basic use of delegation and events:   // Define the delegate Template Public Delegate void receivemsgeventhandled (Object sender, clstcpmsgeventargs E ); // Define the event Private event extends emsgeventhandler extends emsgevent; //

C # basic syntax

I. Condition statements: If (condition) {// Execution statement} Else if {condition} {// Execution statement} Else {// Execution statement}   Int I = 0; Swith (I) { Case 0: // Execute the statement Break; Case 1: //

C # obtain the disk space

Private void button#click (Object sender, eventargs E){String strrecordfilepath = "D:/dasda ";String STR = strrecordfilepath. substring (0, 1). toupper (); // use the first letter and convert it to uppercase.This. m_chkdisk (STR );} // Strdisk

Use rot13 to encrypt and decrypt data in C #

Rot13 is a simple encryption method, mainly used to encrypt the first 13 letters and the last 13 letters of 26 English letters. Today, let's take a look at the implementation of using rot13 for encryption and decryption in C #. Let's use an instance

C # determine if the program is running

/// /// Application Program ./// [Stathread]Static void main (){// Obtain the name of the process to be startedString strprocessname = system. Diagnostics. process. getcurrentprocess (). processname;//// Obtain the version number// Commondata.

C # implement all classical sorting algorithms

C # achieve all classic sortingAlgorithm // Select sortingClass selectionsorter{Private int min;Public void sort (INT [] ARR){For (INT I = 0; I {Min = I;For (Int J = I + 1; j {If (ARR [J] Min = J;}Int T = arr [Min];Arr [Min] = arr [I];Arr [I] = T;}

C # Polymorphism

The same operation acts on different objects and can have different interpretations to produce different execution results. This is polymorphism. In an object-oriented system, polymorphism is a very important concept. It allows customers to

C # Class Design Manual (1)

Programmer to programer booksC # class design handbookRichard Conway, Teun duynstee, etc.Tsinghua University Press It should be said that it is a very good book to understand some basic concepts, although the C # Program But after two days, I

C # Class Design Manual (3)

Programmer to programer booksC # class design handbookRichard Conway, Teun duynstee, etc.Tsinghua University Press Events and Delegation Event-based programming is the cornerstone of the. NET Framework. The event mechanism in. NET Framework

Write yourself: learn C ++

I have been using C ++ for a month. This month has made great progress. First of all, I would like to thank many people for their help, including those in the QQ group and friends in the blog garden. Among them, the biggest problem you encounter is:

Converts a floating point number to a string's c ++ function based on the specified number of digits.

String Preprocess: do_fraction ( Double Val, Int Decplaces){ // Int prec = numeric_limits :: digits10; Char Decimal_point = ' . ' ;Ostringstream Out ; // Out. Precision (Prec ); Out Val; String

C ++ stirng, int Conversion

C ++ is used in the near-Project, and the Data Type in C ++ is not the general BT. In particular, Ting and I are still operating separately. I wrote the underlying layer, using the Win32 console, while ting wrote the MFC. Because there is no

Configuration and calling of Cassandra, A nosql database of facebookde (Java & C #)

For more information about the installation, see steps and problems encountered when installing Cassandra on the Debian system of virtualbox virtual machine. Of course, it can also be used in windows, but you need to set the java_home parameter and

C/C ++ FAQs

If Code When the while (* P) clause is used to determine the end of the string, use * P! = '\ 0. 1) questions about sizeof and const Series A. For struct s {char a; int B} sizeof (S) = 8 because of memory alignment B. For struct s {int A; char B}

C # implement the icon (system tray) function in the lower right corner

Drag the policyicon component into the form. Icon displayed in the icon attribute in the policyicon The basic functions of the system tray are as follows:Code(Click to minimize form hiding, double-click the icon to display) and exit the

C # implement DES encryption and decryption

Using system;Using system. IO;Using system. Security. cryptography; Namespace vavic{/// /// Security summary./// Public class security{Const string key_64 = "vavicapp ";Const string iv_64 = "vavicapp"; // note that it is 8 characters long and

Example code of C # event mechanism: CAT-> mouse, Master

Using System; Namespace Eventdemo { Public   Delegate   Void Catbrayeventhandle ( Int Score ); Public   Class Sleeping { Public   Event Catbrayeventhandle catshout; Int Thescore; Public   Int Score { Get  

Interpreting C # Regular Expressions

For years Programming Language And tools support regular expressions ,. net base class library contains a namespace and a series of classes that can fully utilize the power of Rule expressions, and they are also compatible with future rule

C # DataGridView style (blue)

Code: # Region DataGridVeiw StyleSystem. Windows. Forms. Maid style maid = new System. Windows. Forms. Maid ();System. Windows. Forms. Maid style maid = new System. Windows. Forms. Maid ();This. Maid = false;This. Maid = false;DataGridViewCellStyle1.

C # implementation window "kidnapping"

The so-called "kidnapping" is to embed the forms of other Win32 programs into our managed WinForm. many java and Delphi versions and WPF versions have been used on the Internet. I will add C # here. Define the required Win32 API Code highlighting

Total Pages: 5902 1 .... 4890 4891 4892 4893 4894 .... 5902 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.