Results 1 to 7 of 7

Thread: [2.0] Len Property???[RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Rattlerr's Avatar
    Join Date
    Jul 2005
    Location
    FloralCity,Florida
    Posts
    269

    Question [2.0] Len Property???[RESOLVED]

    From what i have seen in the msdn C# only contains a Len Property compared to VB.NET that has a boat load, for Len...Now this is fairly new Arena for me,dealing with Len and Char Strings...So here is the VB.NET Code section that i'm currently working on..

    VB Code:
    1. Public Function Header(ByVal PacketType As String, ByVal pck As String) As String
    2.         Dim i As Short
    3.         Dim x As Short
    4.         x = 0
    5.         i = Len(pck) /* Here is the Len part*/
    6.         Do While i > 255
    7.             i = i - 256
    8.             x = x + 1
    9.         Loop
    10.         Header = Name & Chr(0) & Chr(Ver) & New String(Chr(0), 2) & Chr(x) & Chr(i) & Chr(0) & Chr(CInt("&H" & PacketType)) & New String(Chr(0), 8) & pck
    11.         Debug.Print(Header)
    12.     End Function

    Now i'm not even sure where to begin with the Len,because theirs hardly any information about it for C#..Only thing i have managed to find is a Len Property using a { get; set; }... Only other part of the Code above i havent moved to C# is the the section below::
    VB Code:
    1. Header = Name & Chr(0) & Chr(Ver) & New String(Chr(0), 2) & Chr(x) & Chr(i) & Chr(0) & Chr(CInt("&H" & PacketType)) & New String(Chr(0), 8) & pck

    Thxs in Advance for the help on this quiet interesting section
    Last edited by Rattlerr; Aug 9th, 2006 at 01:42 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width