C# Library (For People From VB.net)

Discussion in 'Programming General' started by Skeletron, Mar 29, 2007.

C# Library (For People From VB.net)
  1. Unread #1 - Mar 29, 2007 at 12:05 AM
  2. Skeletron
    Referrals:
    0

    Skeletron Guest

    C# Library (For People From VB.net)

    Are you sick and tired of VB.net having functions like Asc, StrReverse, IsNumeric that C# does not have.

    Well, this is what I use in C# that is the same as those functions but created 100% by me. When I moved to C# I noticed that most of the functions like these old Com components that are still incorporated in VB.net were not anywhere on C#. So, best thing I had to do is to built them my self.

    These functions are extremely fast; much faster then the VB.net's one's.



    I have not had time to finish up the Chr in here that operates with Asc but the Chr function for now only support one letter.

    Hopefully these can be used in your programs.

    ~Skeletron
     
  3. Unread #2 - Mar 29, 2007 at 3:10 AM
  4. Flaming Idiots
    Joined:
    Dec 22, 2005
    Posts:
    235
    Referrals:
    1
    Sythe Gold:
    0
    Two Factor Authentication User

    Flaming Idiots Active Member
    Visual Basic Programmers

    C# Library (For People From VB.net)

    Some of you methods could be much shorter.
    For example, you can get the ascii value of a character using the following
    Code:
    // For characters
    int AsciiValue1 = (int)'d';
    //or for strings
    int AsciiValue2 = (int)"d"[0];
    You can also get characters from their ascii value using this:
    Code:
    char Character = (char)97;
     
  5. Unread #3 - Mar 29, 2007 at 11:19 AM
  6. Skeletron
    Referrals:
    0

    Skeletron Guest

    C# Library (For People From VB.net)

    Yeah I know that but the Chr in here pretty much works with the way that the Asc works but this Chr turns the Asc value into a valid Chr.

    The Chr that is incorporated into the C# Namespace works fine though if you want to use that one.

    But then again, I still have to finish up it for full compatibility.

    And the Asc value is meant to take a long string like Asc("Hello") and convert it into a line of Asc values. For it to convert back into a Chr value I will have to sit down with it after school and finish it up since it can only support 1 Chr.

    Oh and also, 'ascvalue = (int)'d';', that is in there.

    Timing is fast, I tested it with a stopwatch and it did a long string like "sdgsgsggbnggntn" to a Asc in 0ms.

    Much faster then the one in the VB name space because it calls it from a .dll and is actually not included into the .net framework.
     
< i got PATH ? | Quick Question >

Users viewing this thread
1 guest


 
 
Adblock breaks this site