C #ProgramCentralized method of current path
System. Diagnostics namespace
String str1 = process. getcurrentprocess (). mainmodule. filename; // obtain the file name of the currently executed exe.
System namespace
String str2 = environment.
From http://www.lwolf.cn/blog/article/code/csharp-shell%20.htm
I recently searched for C # on the Internet #ProgramI found some methods for shelling and tried it myself. It feels pretty good. The following are found on the Internet. Here we will
Conversion from: How to Use C # To create a floating window Program
UseC #Make a photoFlashgetThe floating window is actually very simple, unlike the previous call to many systemsAPI. The general steps are as follows.
The first is the main
Today, I made a software program and found that there are only a few classes to be called when I want to release it, just like packaging them with the EXE files. It will be convenient to copy them to other places for use in the future, so I searched
FirstProgramAdd a contexmenustrip1 control to add a delete item to the control,Bind the contexmenustrip attribute item of the datagridview to the contexmenustrip1 control you added. Then you can write a program to delete the specific items.
These
Supplement: for example: (IntI =0I 10I ++){Thread t =NewThread () T. Start ()}
This is not a thread with the same nameThread t = new thread ();In each loop, the T variable in the previous loop has expired. This is a problem with the variable
1 . Set form attribute showintask = False 2 Add the policyicon control policyicon1 to add an icon for the property icon of the control policyicon1. 3 . Add a form minimization event (you must first add an event reference ): // This.
In the following function declaration, why do I need to use both * and? And on what occasions does this statement work?
Void func1 (myclass * & pbuildingelement );
This issue is frequently asked in forums. This article attempts to explain this
There are two types of data in C #: value data and reference data. Distinguish the two types of data during encoding to avoid some minor encoding errors.
First, let's talk about what types are value types, such as basic types such as int, float,
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> // Public Interface Shape{ Void Draw ();} Public Class Circle: Shape{ Public Void Draw (){Console. writeline ( " Draw
The Destructor is used to analyze the instances of the class. Remarks
The Destructor cannot be defined in the structure. Only destructor can be used for classes.
A class can have only one destructor.
The Destructor cannot be
The three methods are as follows:String A = "";1. if (a = "")2. If (A = string. Empty)3. If (A. Length = 0)
The three methods are equivalent, so which method has the highest performance? I will illustrate the problem with an experiment.
Create
Using system; using system. collections. generic; using system. LINQ; using system. text; namespace colorfulconsole {public class program {public static void main (string [] ARGs) {// create some dummy data so we have // something to display list
Writing today
Code It suddenly reminds me of the efficiency of this method when Microsoft. VisualBasic. Information. isnumeric is often used to determine whether the URL parameter is a number.
Because numbers are directly used as strings, tryparse
System ComplexitySuppose we need to develop a tank simulation system to simulate the behavior of tank vehicles in various combat environments. The tank system consists of engines, controllers, wheels, body and other subsystems.Public Class
It was a very boring afternoon. I was bored with writing such a thing that could convert and reverse convert arbitrary integers according to arbitrary encoding and any hexadecimal conversion.
Purpose:
Evil .. I am not sure about this. At present,
Reflection Overview:
Reflection definition: the ability to review metadata and collect information about its type. Metadata (the most basic data unit after compilation) is a lot of tables.
Program The compiler creates a class definition table, a
Using System; Namespace Leleapplication7 { Class Program { Static Void Main ( String [] ARGs) {People P = New People ( " Name1 " ); P. propertychanged + = New Eventhandler (p_propertychanged ); // Register event processing functions P.
C ++ is really a super complicated language!
Suppose you have an int file, and you want to copy the int to a list. This looks like a reasonable method:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Looking back at the development history of C #, C #1.0 completely imitates Java and retains some features of C/C ++, such as struct, Which is easy for new scholars to use; C #2.0 has added generics, which is exactly the same as Java 3.0's generics.
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