Obtain all started processes in the current computer system:
System. Diagnostics. Process [] processoncomputer = system. Diagnostics. process. getprocesses ();Foreach (system. Diagnostics. Process P in processoncomputer){System. Console. writeline (
C LanguageProgramCompiled memory allocation:1.Stack)--The compiler automatically assigns release, mainly stores the function parameter values and local variable values;2.Heap)--Assigned and released by programmers;3.Global zone or static
// State. cpp: defines the entry point of the console application.//
# Include "stdafx. H"# Include
Using namespace STD;
Class state;
Class Context{Public:Context (State * pstate );~ Context ();Void request ();Void changestate (State * pstate
1. Basic knowledge of functions
C ++ has certain restrictions on the type of returned values: it cannot be an array, but it can make any other type, or even make the structure and object.
Interestingly, although arrays cannot be returned as return
It is always wrong to redefine an inherited non-virtual function. The scope of this article is limited to "virtual function with default parameters ".
Virtual functions are dynamically bound, but the default parameter is static binding.The
1 pair Application
Pair combines two data into one data. When such a requirement is required, pair can be used. For example, map in STL stores the key and value together. Another application is that when a function needs to return two data records,
Document directory
Imagebutton)
Nonsense: It's really hard for programmers to live in tianchao! Yuan Fang, what do you think? For the recent train ticket plug-in event, I think this kind of thing is benevolent and wise.
// Obtain the type T = type. GetType ("myclass") with the name "myclass ");
// Obtain the attributes of "myclass"
Propertyinfo [] properts = T. getproperties ();
// Obtain an Attribute Based on the attribute name
Propertyinfo P = T. getproperty ("ID
What is an event? Event? Click Event? Load events? A series of vague concepts impact our weak head
Let's take a look at the more orthodox ideas:
An event is a way to provide notifications when something is concerned with it.
Generally, events
In the preface, you should have a little understanding of the importance of delegation and events. Although we can still be vague, from my vernacular series, I will make these concepts easy to understand. First, let's talk about delegation first.
I learned linqtosql most, pulled lambda expressions, pulled anonymous methods, pulled delegation, and finally involved event processing... Later I found that I did not have a clear understanding of the concept of delegation and the process of
The anonymous type is a mechanism that automatically generates a type based on the initialization list during initialization. The object initializer is used to create an anonymous object. For example:
VaR OEC = new {name = "oec2003", age = 100}
In C #3.0, allow us to define variables like thisVaR age = 10;VaR name = "James ";VaR time = datetime. now;VaR books = new string [] {"AA", "BB "};But that's all. var only allows us to define the C # compiler to deduce the type of variables through
Static constructor:
(1) It is used to initialize static and read-only fields.
(2) You cannot add access modifiers when adding static keywords because static constructors are private.
(3) Static constructor of a class can be executed at most once in
. Net2.0, although there is also a decompressed class, it does not seem very popular. But we can also choose not sharpziplib.
I found some code from the Internet and made some modifications. It has been tested and can be used. Decompression
This example shows how to dynamically load assembly, how to create object instance, how to invoke method or how to get and set property value.Create instance from assembly that is in your project references
The following examples create instances of
You need to clarify the resources in the C # Program (or. NET. Simply put, every type in C # represents a resource, and resources are divided into two categories:
Managed resources: Resources allocated and released by CLR management, that is, new
How can I find an error window on the desktop, whether it is a parent window or a child window, and obtain its error information?
It mainly uses API functions:Copy and save
[DllImport("user32.dll")]public static extern int FindWindowEx(int
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