asp.net(C#)×Ö·û´®¼ÓÃÜ
asp.net(C#)×Ö·û´®¼ÓÃÜ
2010-03-12 09:59
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;//CryptographyÃÜÂëÊõ
namespace DAL
{
public class Encry
{
public Encry() { }
#region AES¼ÓÃÜ
public static string Encrypt(string toEncrypt)
{
byte[] keyArray = UTF8Encoding.UTF8.GetBytes("12345678901234567890123456789012");
byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);
RijndaelManaged rDel = new RijndaelManaged();//using System.Security.Cryptography;
rDel.Key = keyArray;
rDel.Mode = CipherMode.ECB;//using System.Security.Cryptography;
rDel.Padding = PaddingMode.PKCS7;//using System.Security.Cryptography;
ICryptoTransform cTransform = rDel.CreateEncryptor();//using System.Security.Cryptography;
byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toE
Ïà¹ØÎĵµ£º
ÔÚnetÖÐÓÐÒ»¸öÖÁ¹ØÖØÒªµÄ¹Ø¼ü×Ö£¬ÄǾÍÊÇusing
usingÒ»°ãÓÐ×ÅÒÔϼ¸ÖÖÓ÷¨£º
1¡¢Ö±½ÓÒýÈëÃüÃû¿Õ¼ä
a¡¢using System £¬Õâ¸öÊÇ×î³£Óõ쬾ÍÊÇusing+ÃüÃû¿Õ¼ä£¬ÕâÑù¾Í¿ÉÒÔÖ±½ÓʹÓÃÃüÃû¿Õ¼äÖеÄÀàÐÍ£¬¶øÃâÈ¥ÁËʹÓÃÏêϸµÄÃüÃû¿Õ¼ä
b¡¢Ê¹ÓÃÈ«ÏÞ¶¨Ãû
²»ÓÃʹÓÃusing System;Ö±½ÓÔÚ³ÌÐòÖе÷ÓÃSystem.Console.WriteLine("Hello ......
C#Windows·þÎñ³ÌÐòµÄ¿ìËÙ¿ª·¢ÏòÄã½éÉÜÁËÔںܶàÓ¦ÓÃÖÐÐèÒª×öwindows·þÎñÀ´²Ù×÷Êý¾Ý¿âµÈ²Ù×÷£¬Ï£Íû¶ÔÄãÁ˽âC#Windows·þÎñ³ÌÐòµÄ¿ª·¢ÓÐËù°ïÖú¡£
C#Windows·þÎñ³ÌÐòµÄ¿ìËÙ¿ª·¢£ºÔںܶàÓ¦ÓÃÖÐÐèÒª×öwindows·þÎñÀ´²Ù×÷Êý¾Ý¿âµÈ²Ù×÷£¬±ÈÈç
£¨1£©Ò»Ð©·Ç³£ÂýµÄÊý¾Ý¿â²Ù×÷£¬²»ÏëÒ»´ÎÐÔÈ¥×ö£¬ÏëÂýÂýµÄͨ¹ý·þÎñ¶¨Ê±È¥×ö£¬±ÈÈ綨ʱΪ ......
public struct POINTAPI
{
public int x;
public int y;
}
public static void GetWindowfromPoint(ref int hwnd,ref StringBuilder winText,ref StringBuilder clsName,ref StringBuilder pText)
{
int parentHandle=0;
int maxLen=128;
POINTAPI pnt = new ......
¿´Á˺ܶà.°´ÕÕ ×Ô¼ºÃ÷°×½âÊÍһϠ.NET RefºÍOut¹Ø¼ü×Ö ¶ÔÓÚÖµÀàÐÍ¡£ Èç¹û²»Ê¹ÓÃref /outÔò´«µÝµÄÖ»ÊÇÕâЩֵµÄCOPY, ʹÓÃÁËRefºÍOutµÄЧ¹û¾Í¼¸ºõºÍCÖÐʹÓÃÁËÖ¸Õë±äÁ¿Ò»Ñù¡£(´«µÝµÄ¾ÍÊÇÔÖµ),ËüÄܹ»ÈÃÄãÖ±½Ó¶ÔÔÊý½øÐвÙ×÷£¬¶ø²»ÊǶÔÄǸöÔÊýµÄCopy½øÐвÙ×÷ ¶ÔÓÚÒýÓÃÀàÐÍ: Èç¹û²»Ê¹ÓÃref /out,ÒòΪ´«µÝµÄÊÇÒýÓÃÀàÐ͵ĵØÖ·Öµ,Ô ......
Ò»¡¢²åͼµÄÀࣨº¬2·½·¨£©
1using System;
2using System.Collections.Generic;
3using System.Text;
4//using Excel = Microsoft.Office.Interop.Excel;
5using Excel;
6using System.Windows.Forms;
7
8
9namespace ExcelReport
10{
11 class InsertPicToExcel
12 {
13 / ......