Use ShellClass to obtain File Attribute details

First, reference the COM component. Microsoft Shell Controls And Automation Note that Set the DLL attribute Embed Interop Type to False. Otherwise, the interoperability type is abnormal.   The Code is as follows: ShellClass sh = new ShellClass

C # form gradient effect

After the program is opened, the form is gradually displayed from transparent to opaque.Implementation Method:1. Add a Timer control (named fadeTimer in this example), and then add the relevant code in FadeTimer_Tick to its Tick event. That's

Introduction to arrays in C # (1)

An array is a data structure that contains several variables. These variables can be accessed through computing indexes. The elements of the array have the same type.The array has a "rank ". The rank of an array is also called the dimension of an

C # decompress the zip file

1. decompression method Reprinted from the http://www.bkjia.com/kf/201204/128704.html "C#decompress The. ZIP file. A lot of methods are found on the Internet, using System. IO. compression. GZipStream uses the J # library function and the Java-based

Google Baidu image search & quot; perception Hash Algorithm & quot; C # simple implementation

/// /// Perceive the hash algorithm/// Public class ImageComparer{/// /// Obtain the Hashcode of the image/// /// /// Public static string GetImageHashCode (string imageName){Int width = 8;Int height = 8; // Step 1// Reduce the image size to 8x8,

C # simple application of reflected Assembly

Reflection (Reflection) is. NET, which can be obtained at runtime through reflection. NET, including methods, attributes, events, and constructor. You can also obtain the name, qualifier, and parameters of each member. With reflection, you can be

Windows function hook implementation

You must understand the PE file structure and basic windowsAPI. The following program replaces the MessageBoxA function in user32.dll with its own MyMessageBox, which is a redirection function.   [Cpp]// NormalProject. cpp: Defines the entry point

LINQ tip: How to Implement group nesting by calling GroupBy multiple times

[Csharp]Using System;Using System. Linq; Namespace ConsoleApplication1{Class Program{Public class S{Public int Year;Public int Month;Public int Day;}Static void Main (string [] args){Var m = new [] {New S {Year = 2000, Month = 1, Day = 10 },New S

C # Write richTextBox with row number

Add two controls: Panel/RichTextBox   View sourceprint? 01 // Method 02 03 private void showLineNo () 04 05 { 06 07 // obtain the current coordinate information 08 09 Point p = this. richTextBox1.Location; 10 int crntFirstIndex = this.

Use of question marks in C #

1. Can be empty type modifier (?) : The reference type can use null reference to indicate a nonexistent value, while the value type cannot be null. For example, string str = null; is correct, int I = null; the compiler reports an error. To make

Week 2 C # Computer Experiment (2) obtain the ASCII value of letters

Experiment Description: first, read characters using the ReadKey () method in the Console class, and then obtain the ASCII value.Source code:[Csharp]Using System;Using System. Collections. Generic;Using System. Linq;Using System. Text; Namespace

C # operate MySql and PostgreSQL

We are all familiar with MySql, and PostgreSQL is not so famous. in fact, they are two similar relational databases. postgreSQL was originally named Postgres. After some improvements, it was renamed PostgreSQL. After installing MySQL, there is

Hdu 1284 coin exchange problem (DP)

[Csharp]// Dp (full backpack)# Include # Include # Define N 35000Int dp [N];Int main (){Dp [0] = 1;For (int I = 1; I {// The backpack capacity is N, and items with a quality of I are loadedFor (int j = I; j {Dp [j] + = dp [j-I];}}Int n;While (scanf (

Multithreading in C #-getting started

Overview and conceptsC # supports code execution in parallel through multiple threads. A thread has its own execution path and can run concurrently with other threads. A c # program starts with a single thread. This single thread is automatically

C # Extension Method

The parameter must be a static method parameter of the static class. this must be used to specify the type of extended method.Public static class Common{/// /// Convert the Object type to string, and null to null./// /// /// Public static string

C # Performance Optimization

Continue with the previous article. The complete source code of this article is also in the previous article.Enumeration array and common enumeration performance differencesSome people may know that. net has special optimization on arrays when

A brief preliminary understanding of generics

Many people have used generics. However, we have been puzzled by generics. For example, we often use arraylist. But he does not know his benefits. Generic: when we define a method. The parameter to be used can be (1) int, (2) string, (3) array, or (

C # Lossless Image Compression-implemented based on the Framework.40 class library

There are two parts: one is the operation class and the other is the test. Code directly   I. Test code Private void button#click (object sender, EventArgs e){String newSourcePath = ImgPath; // source image storage directoryString newNewDir =

In the constructor: this (...) Use

: This (...)• One constructor can call another constructor.Struct ColouredPoint{Public ColouredPoint (int x, int y): This (x, y, Colour. Red){} Public ColouredPoint (int x, int y, Colour c){...}...Private int x, y; www.2cto.comPrivate Colour

JS method triggered when the text box is left with the mouse

[Csharp]  www.2cto.comAuthor: pengshumin89

Total Pages: 626 1 .... 508 509 510 511 512 .... 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.