[±Ê¼Ç]C#ʵÏÖ¶¯Ì¬±àÒë
½ñÌì¿´ÁËÎÒµÄÀÏʦÖÓÉùµÄÊ顶Java³ÌÐòÔ±ÉÏ°àÄǵã¶ùÊ¡·£¬ÆäÖÐÓÐÒ»¶Î¹ØÓÚJavaʵÏÖ¶¯Ì¬±àÒëµÄ´úÂëʹÎÒºÜÊÜÆô·¢£¬¾ö¶¨ÔÚ.NETÖг¢ÊÔһϡ£
ÒýÈëÏÂÁÐÃüÃû¿Õ¼ä£º
using System.CodeDom;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
C#´úÂ룺
CodeDomProvider provider = CodeDomProvider.CreateProvider("CSharp");
//CodeDomProvider ¿ÉÓÃÓÚ´´½¨ºÍ¼ìË÷´úÂëÉú³ÉÆ÷ºÍ´úÂë±àÒëÆ÷µÄʵÀý£¬Õâ¸öÀàÊÇÒ»¸ö³éÏóÀ࣬ÐèҪʹÓÃCreateProvider()·½·¨´´½¨¡£
string[] referenceAssemblies = new string[]
{
"System.dll"
};
CompilerParameters cp = new CompilerParameters(referenceAssemblies, "Demo.exe", false);
//±íʾICodeCompiler½Ó¿ÚµÄÉèÖúÍÑ¡ÏîµÄCompilerParameters ¶ÔÏ󣬵ÚÒ»¸ö²ÎÊý±íʾÒýÓõijÌÐò¼¯£¬µÚ¶þ¸ö±íʾÊä³öµÄÎļþÃû£¬µÚÈý¸ö±íʾÊÇ·ñµ÷ÊÔ¡£
cp.GenerateExecutable = true;
StringBuilder code = new StringBuilder();
code.Append("using System;");
code.Append("namespace Simple{");
code.Append("public class DemoClass{");
code.Append("public static void Main(string[] args){");
&nbs
Ïà¹ØÎĵµ£º
ÏÈ˵python
pythonµÄrandomÄ£¿éÌṩÁ˶à¸öαËæ»úÊý·¢ÉúÆ÷£¬Ä¬È϶¼ÊÇÓõ±Ç°Ê±¼ä´ÁΪËæ»úÊýÖÖ×Ó¡£
ÏÂÃæÊǸÃÄ£¿é¼¸¸ö×î³£Óõĺ¯Êý
random() Return the next random floating point number in the range [0.0, 1.0).
randint(a,b) Return a random integer N such that a <=
N <= b
randrange([star ......
ÒÑÖªÓÐÒ»¸öXMLÎļþ£¨bookstore.xml£©ÈçÏ£º
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
&nb ......
C#ÕýÔò±í´ïʽ±à³Ì£¨¶þ£©£ºRegexÀàÓ÷¨
¶ÔÓÚÕýÔò±í´ïʽµÄÓ¦Ó㬻ù±¾ÉÏ¿ÉÒÔ·ÖΪÑéÖ¤¡¢ÌáÈ¡¡¢·Ö¸îºÍÌæ»»¡£½ö½öÀûÓÃRegexÀà¾Í¿ÉÒÔʵÏÖÑéÖ¤ºÍ¼òµ¥Ìæ»»¡£
ÀûÓÃRegexÀàʵÏÖÑéÖ¤
¾Àú2009ÄêµÄ±¸°¸ºÍDNSÍ£Ö¹½âÎö·ç²¨Ö®ºó£¬´ó²¿·ÖµÄ´øÓз´À¡ÐÔµÄÍøÕ¾ºÍÂÛ̳¶¼¶ÔһЩÃô¸Ð´Ê½øÐÐÁ˹ýÂË£¬°üº¬ÓÐÕâÀàÃô¸Ð´ÊµÄÎÄÕÂҪôÄÚÈ ......
private static int level=0
public static int FindGUILike(ref int hWndArray,int hWndStart,ref string windowText,ref string className,ref string parentText)
{
int hwnd=0;
int r=0;
StringBuilder sWindowText=new StringBuilder();
StringBuilder sClassname=new StringBuilder();
StringBuilder sParentT ......