Process extension class in C #

/// /// Process extensions/// Public static class ProcessExtensions{# Region Functions # Region KillProcessAsync /// /// Kills a process/// /// Process that shoshould be killed /// Amount of time (in MS) until the process is killed. Public static

C # Win32API class

Class Win32API{[DllImport ("User32.dll")] // User32.dll is one of the core dynamic libraries of the Windows operating system.Public static extern int FindWindow (string lpClassName, string lpWindowName ); [DllImport ("user32", EntryPoint =

Winfrom controls data transfer between forms

Method 1You can customize a constructor in a subform. The parameter type is the main form. When you want to display the subform, use this constructor to instantiate the subform and pass this pointer in. The Code is as follows:Main form. csPublic

C # multithreading test code

Public class ThreadMulti{ # Region variable Public delegate void DelegateComplete ();Public delegate void DelegateWork (int taskindex, int threadindex ); Public DelegateComplete CompleteEvent;Public DelegateWork WorkMethod; Private Thread [] _

Common Regular Expression check

[Csharp]Private static Regex RegPhone = new Regex ("^ [0-9] + [-]? [0-9] + [-]? [0-9] {1} $ ");Private static Regex RegNumber = new Regex ("^ [0-9] + {1} $ ");Private static Regex RegNumberSign = new Regex ("^ [+-]? [0-9] + {1} $ ");Private static

C # generic learning 03 -- replace ArrayList with the corresponding generic version

1. A simple example of using the System. Collection. ArrayList object:View CodePublic static void UseNonGenericArrayList (){// Create an ArrayList.ArrayList numbers = new ArrayList ();Numbers. Add (1); // causes the boxing operationNumbers. Add (2);

C # use a regular expression to obtain the value between the start and end strings

/// /// Obtain the value between the start and end strings./// /// string /// Start /// end /// Public static string GetValue (string str, string s, string e){Regex rg = new Regex ("(? Return rg. Match (str). Value;}  From fanwa Software

Create a non-rectangular form

Frm_Main.csView Code1 using System;2 using System. Collections. Generic;3 using System. ComponentModel;4 using System. Data;5 using System. Drawing;6 using System. Text;7 using System. Windows. Forms;8 using System. Runtime. InteropServices;910

Start the form from the last closed position

Frm_Main.csView Code1 using System;2 using System. Collections. Generic;3 using System. ComponentModel;4 using System. Data;5 using System. Drawing;6 using System. Text;7 using System. Windows. Forms;8 using Microsoft. Win32;910 namespace

Use the embedded firebird Database in C #

  Using System; Using System. Collections. Generic; Using System. Text; Using FirebirdSql. Data. FirebirdClient; Namespace CreateDB { Class Program { Static void Main (string [] args) { FbConnection. CreateDatabase (GetConnectionString ());   Using (

C #3.0 Study Notes (4) structure struct

  1. What is structure?   A: The structure is a data type defined by a programmer. It is very similar to a class.   2. What are the differences between structures and classes?   1. The class is the reference type, and the structure is the value type.

Get the coordinates of the mouse

  Obtain the coordinates relative to the screen on the form :] Method 1: Public class Win32 { [StructLayout (LayoutKind. Sequential)] Public struct POINT { Public int X; Public int Y;   Public POINT (int x, int y) { This. X = x; This. Y =

C #3.0 learning notes (9) Conversion

  1. What is conversion? A: conversion is a process of accepting a value of a type and using it as an equal value of another type.   2. implicit conversion? Language (C #) automatically performs these conversions without losing data or precision.

C # some practical and easy-to-Forget features, experiences, and skills

  I suddenly thought that I wanted to get the enumerated value by name. I read a lot of information and found that the above only explained the enumeration syntax. I did not mention it at all for its practical application, can I only use a switch to

C # One of the simulated keyboard and mouse

  Some tasks in the work need to use a simulated keyboard and mouse to automatically call the business, although the original colleagues have done some sharing methods and used XML configuration files to configure the simulated action flow, however,

C # delegated instance (cross-form operation control)

  Today I have studied that in C #, cross-form call controls can be implemented without complicated methods such as custom messages. A better way for C # is to delegate. Effect Description: there are two forms: FORM1 (A button control named "Open

C #: Differences and Similarities between abstract virual

  1: Abstract METHODS must not be implemented and must be implemented by an inherited class (if this class is not an abstract class. The class that declares the abstract method must be the abstract class, and the abstract class can have other

C # WinForm TextBox conjecture input and history input (source code)

  What is conjecture input? When we use a query application, the phrase associated with this keyword is automatically displayed under the text box after a keyword is entered for selection, saving us time for input, this is the hypothetical input,

C # (winform) Example of operating the .txt text

  Background: A textbox can be input to implement the search function. Function Improvement requirement: the textbox is transformed into an input drop-down box. The content of the drop-down box is a historical search record (the content of the last 2

Obtains the month between two time periods.

/// /// Obtain the month between two time periods/// /// Start month /// end month /// month string Public static string DateFiledMonths (string startTime, string endTime){Try{Int index = 0;String filed = string. Empty;DateTime c1 = Convert.

Total Pages: 626 1 .... 515 516 517 518 519 .... 626 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.