The parameter transfer mechanism of the C # method is different from that of the C and C ++ languages. An output transfer mechanism is added, and the other two mechanisms are value transfer and reference transfer.
Summary:
The parameter transfer
If the program needs to be processed for a long time during loading, it is best to use the startup screen. On the one hand, the program is beautified, and on the other hand, the user does not face a blank interface.When I started the main interface
Before discussing this issue, we should first understand the idea that communication between threads is through sending signals. (This is not nonsense)
First, we will discuss ManualResetEvent. During the discussion, I will introduce some
Private void button2_Click (object sender, EventArgs e){// Remove the specified character at the beginning and end of the stringString MyInfo = "-- People's Republic of China --";// Display "People's Republic of China"MessageBox. Show (MyInfo. Trim (
Two days ago, I looked at MSDN and found an interesting feature. I can directly use code to control the compilation of C # programs. There is such a thing that it would be easier for some programs to implement the function of instantly modifying the
Solutions to problems:
1. Microsoft Picture Clip Control, version 6.0 cannot be found in COM components.
Solution: Download PICCLP32.OCX and register regsvr32 c: windowssystem32PICCLP32. OCX (because I copied this file to c: windowssystem32)
2.
. Net encapsulated Method
int x = Control.MousePosition.X;int y = Control.MousePosition.Y;
API method
using System.Runtime.InteropServices;
Point p; [DllImport ("user32.dll")] public static extern bool GetCursorPos (out Point pt); private void
I,Environment Settings
First, remove the following options in the VS development environment:
Adjust indentation when pasting
Place the left braces of the type in the new line
Place the left braces of the method in the new line.
Place the left
When calling an unmanaged function in C #, many functions need to use the address of the object defined in C #. Therefore, the GCHandle class is used.
Usage:
DWORD ReadCert (UNT_DEV_HANDLE hDev,BYTE * pbCert,DWORD * pdwCertLen,DWORD dwFlag );
///
1), Framework1.1. How to display a tray icon prompt with the close button?
I was able to find a simple answer. Instead of using:
TaskbarIcon.ShowBalloonTip(10000);
I cocould use the second form of this
During winform development, other programs may need to be closed or the process should be closed. I have written an article about this. Some colleagues asked me today, so I will share it with you on the next page.
The following two methods I know
In C # learning, it is easy to confuse the use of virtual and abstract methods. Now let's discuss the differences between them. Both of them involve the use of override in a derived class.1. Virtual Method)Virtual keywords are used to modify methods
Namespace WindowsFormsApplication2{Partial class read database{/// /// Required designer variables./// Private System. ComponentModel. IContainer components = null;
/// /// Clear all resources in use./// /// If the managed resource should be
Bubble Sorting
I used C # To develop a Bubble Sorting Algorithm. Hope to bring some benefits to learners of C # language. Don't forget, it takes a lot of effort to learn data structures and algorithms to learn languages.
Using System;Namespace
Note: This program is written on the basis of VS2005.1. If you do not want the program to be displayed in the taskbar, set ShowInTaskbar of the form attribute to false;2. If you want to minimize program startup, set the WindowState attribute of the
// Page call
Private void SendMassage (string Telephone, string text)
{
SendMobile sm = new SendMobile (Telephone, text );
Sm. SendMsg ();
}
// Reference
Using System. Text;
Using System. Net;
Using System. IO;
// Using cn. sh. unicom.
In C #, new and override are two frequently used keywords in inheritance, but they are often easy to confuse the functions of these two keywords.
New
C # The new Keyword indicates hiding. It indicates that an attribute or function with the new
Using System. Runtime. InteropServices;Namespace TST. SINGLE{Public class TSTPGM{[DllImport ("user32.dll")][Return: financialas (UnmanagedType. Bool)]Static extern bool SetForegroundWindow (IntPtr hWnd );/// /// The main entry point for the
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.