Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

c#Óë×îÅ£vbËã·¨±ÈÆ´ by Error


 
ÎÄÕÂÀ´Ô´: http://www.zoesan.com By Error 302777528תÔØÇë×¢Ã÷³ö´¦
ÒÔÉÏvbÓõ½Ö¸Õë¼¼Êõ²éÕÒ×Ö·û´®Óëc#Ò»°ãµÄ.indexof()²éÕÒÏà±È½Ï£¬Ã÷ÏÔ¿´³öË­¿ìË­Âý¡£
VB:
Option Explicit
'Ö¸Õë·½·¨²Ù×÷×Ö·û´®
'CopyÒ»¸ö×Ö·û´®µ½»º´æÖÐ
Public Declare Function GetTickCount Lib "kernel32" () As Long
Public Declare Function lstrcpy Lib "Kernel32.dll" Alias "lstrcpyW" (lpszString1 As Any, lpszString2 As Any) As Long
'ͨ¹ýÖ¸Õë»ñÈ¡×Ö·û´®µÄ³¤¶È
Public Declare Function lstrlen Lib "Kernel32.dll" Alias "lstrlenW" (ByVal lpszString As Long) As Long
Public Function FindTextInStr(ByVal OriStr As String, ByVal strText As String) As Long
Dim Buff() As Byte   'ÉùÃ÷Ò»¸öByteÊý×é
Dim Pointer As Long  'ÉùÃ÷Ò»¸ö±äÁ¿£¬ÓÃÓÚ´æ´¢Ö¸Õë
Pointer = StrPtr("Love")
ReDim Buff(0 To lstrlen(Pointer) * 2 - 1) As Byte  '·ÖÅ仺´æ´óС,ÓÉÓڵõ½µÄÊÇUnicode£¬ËùÒÔ³ËÒÔ2
lstrcpy Buff(0), ByVal Pointer   '¸´ÖƵ½»º´æBuffÖÐ
' Me.Caption = InStr(1, Buff, StrConv("o", vbfromUnicode))
FindTextInStr = InStr(OriStr, StrConv(strText, vbfromUnicode)) '²éÕÒ×Ó×Ö·û´®Î»ÖÃ
' Debug.Print Buff    'ÏÔʾµ½text1ÖÐ
End Function
Private Sub Command1_Click()
  Dim sTime As Long
  sTime = GetTickCount
  For i = 1 To 10000
  Call comPareTime
  
  Next
  sTime = GetTickCount - sTime
  Label1.Caption = "²éÕÒ10000´ÎÔÁICP±¸05004654ºÅ»¨·Ñ" & sTime & "ms"
End Sub
Sub comPareTime()
   Dim i1 As Long
i1 = FindTextInStr(RichTextBox1.Text, "ÔÁ")
End Sub
'''''''''''''''''''''''''''''''''''''''''''
C#´úÂë:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Configuration;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebContro


Ïà¹ØÎĵµ£º

asp.net(c#)Êý¾ÝÀàÐ͸ñʽת»»´óÈ«

1¡¢DateTime   Êý×ÖÐÍ 
       System.DateTime currentTime=new System.DateTime(); 
  1.1 È¡µ±Ç°ÄêÔÂÈÕʱ·ÖÃë 
       currentTime=System.DateTime.Now; 
  1.2 È¡µ±Ç°Äê 
   &nb ......

pb調ÓÃVB寫µÄDLL·½·¨

1¡¢ÏÈ°ÑVB±àÒëºÃµÄDLLÎļþ·Åµ½ÏµÍ³µÄSYSTEM32Îļþ¼ÐÏÂ
2¡¢ÓÃregsvr32×¢²áÕâ¸öDLLÎļþ
3¡¢Pbϵ÷ÓÃ
oleobject   ole_1
ole_1=create   oleobject
long   ll_ret
ll_ret=ole_1.connecttonewobject( 'add.addstring ')//ÆäÖÐaddΪVBµÄ¹¤³ÌÃû£¬addstringΪVBµÄÀàÄ£¿éÃû
string   ls_message, ......

flash C# Socket

2009-09-01 17:33ÔÚ.netÖж¨ÒåÒÔÏÂ
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
namespace ClientSocket
{
public class AsynchronousSocketListener
{
    //Òì²½socketÕïÌý
    // Incoming data from client.´Ó¿ ......

C#ʵÏÖXMLϵÁл¯ºÍ·´ÏµÁл¯µÄ×ܽá

³£ÓõÄϵÁл¯¶¨Ò壨using System.Xml.Serialization;£©
[XmlAttribute("name")]        // ¶¨Òå<Tag name="…"></Tag>
[XmlElement("label")]        // ¶¨Òå<label>…</label>
[XmlIgnoreAttrib ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ