When applying enumeration, you often need to convert enumeration and numerical values. Sometimes it is necessary to convert it into a corresponding Chinese character. The following describes a method.
First, create an enumeration:
/// ///Color///
// Obtain the hard disk serial number
Public static void gethdindex (){String _ hdinfo = "";Managementclass cimobject1 = new managementclass ("win32_diskdrive ");Managementobjectcollection moc1 = cimobject1.getinstances ();Foreach
// The following is the completeCodeUsing system; using system. collections. generic; using system. text; namespace arraymaxvalue74 {class program {public static int maxvalue (INT [] S) {int temp = s [0]; for (INT I = 0; I
Query int [] S = {1
The following is the implementation of the policyicon class. Do not forget to reference Microsoft. WindowsCE. forms. Note that the add method provides different overload methods. For more information, see note:
Using system;Using system. runtime.
The C # Replace function replaces all characters in the string. The replace function in JS only replaces the character encountered for the first time. If there is a character after it, it is not replaced. These are the differences. The replace
In ASP. NET, data is often retrieved from the network or the display of web pages is updated. Because some special characters such as , and & in HTML are displayed with different actual values, the actual values will be different when they are saved
The following describes the pre-compiled commands in C:
1. # define and # UNDEF
Usage:
# Define debug# UNDEF debug
# Define tells the compiler that I define a debug symbol. It is similar to a variable, but it does not have a specific value.
In C #, Dictionary provides quick part-time-based element search. You can use it when you have many elements. It is included in the system. Collections. Generic namespace.
Before using it, you must declare its key type and value type.
Detailed
C # The default modifier of the class is internal, and the default access modifier of the class members is private.
Class Modifier
1. Public is completely open, with no access restrictions
2. Internal is in the sameProgramCentralized access
3.
C # Summary of three naming methods commonly used in programming
1. Camel-Type COMMAND: a mix of uppercase and lowercase letters is used to form the name of a variable and a function. Lowercase letters.2. Pascal naming: A combination of uppercase
Tip:The changes in the thread status mentioned in this Article do not refer to the migration of the thread's internal status, rather than the start, pause, and stop of the thread.
With the continuous development of software technology and
1. Book. xmlThe file is as follows:
Asp.net essence Liu Xiang 10.23 C # basics Meng NO. 50.28
2. AccordingBook. xmlFile generation architecture fileBook. XSD
Open the book. xml file in vs2010, and an XML menu
C # SQL like parameter "select cast (substring (max (boxid), 10, 3) as INT) from box where boxid like '%' + @ substring + '% '"
The significance of parameterization is to provide the corresponding value from the parameter. For the like statement,
First: http://blog.csdn.net/yangyuankp/article/details/7748110
This is mainly to improve the web end, encapsulate the function into a DLL class library, and make it easy to use. And beautify the integrated background control interface.
At the
First feature:Implicitly typed local variables
This feature is very simple. Some JavaScript shadows can be used in a unified manner."Var"Keyword to declare a local variable, instead of specifying the exact type of the variable. The exact type of
C # has the string keyword. when translated into a. Net class, it is system. String. With it, operations such as string connection and string copying are simple.
1. Is string a reference type or a value type?
Reference Type operation
When the
Net naming rules
1,Namespace
Use Pascal case. Do not use the same name as the class. Rule company name + technical name + Function
Example: aqh. BLL
2,Use Pascal case and name by name or name phrase
Example: public class button
3,Use
I. Differences between using a ref or out prefix and not using a prefix
Int intparam = 0;
Object objparam = NULL;
Public void method (INT intparam, object objparam) // intparam is a value type parameter and objparam is a reference type
(1) create a project solution using vs2008, and add c ++ Project (DLL) and C # project (client) to the solution) [the specific steps for creating the C ++ DLL and C # projects are not described in detail here. Please refer to the related
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