This article continues to introduce how to use the notifyicon of the system tray. The project implementation result is: when the form is minimized, the program icon is displayed in the system tray area and a balloon prompt is displayed. The time is 3
C # the learning of static methods is not only a literal understanding of concepts, but also an understanding of actual operations. Here we will introduce you to the application example of C # static methods.
C # static method is a special
The C # static method usage experience mainly introduces some practical problems encountered during the use of the C # static method and the experience of using the C # static method.
C # What are the drawbacks of static methods? In the actual
First, you must understand the meaning of the class. Class should be understood as a type, like int and char, which is a user-defined type.
Although it is much more complicated than the build-in type like int char, you must first understand that
Note:The project name in this sample code isMcwebserviceWhich is a spelling mistake. I meant to putMcwinservice. And now I don't want to change all the screen shots and code all over again. I hope it won't confuse you :).
OK, its time for one more
1. problem: In socket communication, we often need multiple clients to share one port, but this often reports an error, because normally one port can only be bound once, but it is troublesome to release it, therefore, if Port Sharing is implemented,
First, create a new windows application named movingword, generate the form form1 (Text animation), add a label control and two button controls for the form, a clock control timer, the text attribute of the lable1 control is set to "love you 10
Step 1: Create a Windows application named "mail" and add corresponding controls to the generated form, as shown below:Step 2: add the corresponding code event to the control:
Using system;Using system. Collections. Generic;Using system.
// Date conversion Week (kemlerson formula)
Private string caculateweekday (INT y, int M, int D)
{
// January and February are treated
If (M = 1) | (M = 2 ))
{
M + = 12;
Y --;
}
Int week = (D + 2 * m + 3 * (m + 1)/5 + Y/4-y/100 + Y/400) % 7;
From msdn
Enumeration can be used to store value pairs of strings and numbers, which is equivalent to a comparison table.
Common Methods: getname (), getvalue (), parse () 1 using system;
2
3 Public class enumtest {
4 Enum days {Saturday, Sunday,
Valid C # item 27: Avoid icloneable
Icloneable sounds good: we can use it to support copying data types. However, our classes do not exist independently. Once we decide to support icloneable, all its derived classes also need to implement this
Valid C # item 21: Express callbacks with delegates
Dad: "Son, cut the grass in the yard. I will check the report later ."
Son: "Dad, I have cleaned the yard ."
Son: "Dad, I have added oil to the lawn mower ."
Son: "Dad, you can't start the lawn
Valid tive C # item 20: distinguish between implementing interfaces and overriding virtual functions
At first glance, the implementation interface is similar to the virtual method of rewriting. They all provide definitions for a declared member.
Valid C # item 35: prefer overrides to event handlers
The classes in many. Net class libraries provide two different methods for processing event handles. You can add an event to it or override the event abstraction method of its base class. Why do
Valid tive C # item 30: prefer CLS-compliant assemblies
The. NET environment is language-independent: developers can combine components written in different. NET languages without restrictions. We must create an assembly that complies with Cls
Reading and learning are very rewarding. Write down the translation and your own experience. You are welcome to make a brick
Chapter 1 C # Language ElementItem 1: Always use properties instead of accessible data membersItem 2: prefer readonly to
The location where data is stored in the memory depends on its data type. in C #, it is divided into value type and reference type. Value Type data is stored in the memory stack, each variable or program has its own stack. It cannot share a stack
Because the company has a large number of databases (but the amount of data is small), it needs to be completely backed up every week. In the past, a database was backed up with a single database. After SQL Server is backed up, there is Oracle,
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