Today, there is a need to get all the properties on an object, but without knowing the type of object in advance. My first reaction was to use reflection, but the operation would take many times, and a lot of reflection would certainly have a
Today there is such a demand, request to be able to inquire Sheng card status, the official website below http://www.801335.com/status/index.htm
Just opened the URL, found two input box plus a verification code, the heart is not a small case
Since the use of C #, it really called a cool, no longer need to write function declaration, no longer need to manually free memory, a ToString function, basically all types of conversion are complete ...
But there's a price for it, like using an
Brief introduction
In this help document, I'll show you how to find duplicate values in C # in a dictionary. You know, for a veteran, this is a very simple code. But still, this is a useful help document for C # beginners.
Background
Most
Match phone numberRegex regphone = new Regex ("^[0-9]+[-]?[ 0-9]+[-]? [0-9]$ ");
Matching numbersRegex regnumber = new Regex ("^[0-9]+$");
Match positive and negative integersRegex regnumbersign = new Regex ("^[+-]?[ 0-9]+$ ");
Match decimalRegex
Here are the following functions we must know in the process of intercepting strings: the substring function, the Remove function, the IndexOf function.
substring function
Returns a substring of the first argument that starts at the position
The code is as follows
Copy Code
Using System;Using System.Collections.Generic;Using System.Diagnostics;Using System.Linq; namespace algorithm{public static class algorithm{Cartesian productpublic static list> cartesianproduct (this
The API return values for a piece are all string types, considering that managed pointer debugging for C # in vs2012 may have changed. So change the return value type to
INTPTR, after calling the API, the return value is converted to a string with
When the path D:\web\ does not exist, the bottom two statements will be thrown incorrectly:
File.writealltext (@ "D:\web\index.htm", "111cn.net");File.readalltext (@ "D:\web\index.htm");
Directory.Exists and Directory.CreateDirectory are called
C # Digital formatted output
C #
Digitally format output
int a = 12345678; // format as sring output Label1.Text = string. Format ("Asdfadsf{0}adsfasdf", a); Label2.Text = "ASDFADSF" +a.tostring () + "ADSFASDF"
What is the meaning of the keyword const? What about the modifier class? Static functions for classes? and the role of extern c.
Const means "read Only", what do the following statements mean?
The code is as follows
Copy Code
Precautions for selecting and using C ++ built-in types(1) type selection① When it is clear that the value cannot be negative, the unsigned type is used.② For an integer, either int or long. Short is generally too small. Of course, if it is clear
Join ()-concatenates each element of the object array, where the specified separator is used between each elementParametersSeparatorType: System. StringThe string to be used as the separator. ValuesType: System. Object []An array containing the
The CompareTo method of the string instance can be used for string comparison.The Compare and Compare methods are also character strings, but are more powerful.Basic syntaxCompare has multiple overload functions to list the simplest one.Public
This program has two parts: the first part is the main program, and the other part is the function library.In this program, int [] is used to represent the binary form of char, for example, convert a character = int [8}The following sub-program is
Using System;Using System. Drawing;Using System. Collections;Using System. ComponentModel;Using System. Windows. Forms;Namespace MSDNOUT{/// /// Decompile the Microsoft MSDN2003 document and save it to the main program form of the database/// Public
If (fileupload. PostedFile! = Null) { // Addto is the attribute to be added, and aboutfile is the file description.String nam = fileupload. PostedFile. FileName;// Obtain the index of the last "." in the file name (including the path)Int I
When I visited the CSDN Forum in the evening, I saw a friend in Area C # asking "preventing the MDI subform from being instantiated multiple times" and then wrote this article.In fact, this is the Singleton mode in the classic 23 Design Patterns.
Next, the application of Chinese speech recognition technology in c # (I) ...... However, the method itself does not know the language of the string you are giving, so we need to read the string in what language. The Voice attribute of 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service