Click here to Skip to main content
15,885,871 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reg:email domain Verification Pin
swethasri4-Nov-08 5:17
swethasri4-Nov-08 5:17 
AnswerRe: Reg:email domain Verification Pin
Guffa4-Nov-08 12:36
Guffa4-Nov-08 12:36 
QuestionString implementation in .NET Framework Pin
J4amieC4-Nov-08 3:38
J4amieC4-Nov-08 3:38 
AnswerRe: String implementation in .NET Framework Pin
Ennis Ray Lynch, Jr.4-Nov-08 4:06
Ennis Ray Lynch, Jr.4-Nov-08 4:06 
GeneralRe: String implementation in .NET Framework Pin
J4amieC4-Nov-08 4:12
J4amieC4-Nov-08 4:12 
GeneralRe: String implementation in .NET Framework Pin
Ennis Ray Lynch, Jr.4-Nov-08 4:18
Ennis Ray Lynch, Jr.4-Nov-08 4:18 
GeneralRe: String implementation in .NET Framework Pin
J4amieC4-Nov-08 5:25
J4amieC4-Nov-08 5:25 
GeneralRe: String implementation in .NET Framework Pin
DaveyM694-Nov-08 4:32
professionalDaveyM694-Nov-08 4:32 
Apparently this still exists in the Microsoft.VisualBasic namespace.

This is the Asc function after being run through reflector - it seems to work OK.

public static int Asc(char theChar)
{
    int num;
    int num2 = Convert.ToInt32(theChar);
    if (num2 < 0x80)
    {
        return num2;
    }
    try
    {
        byte[] buffer;
        Encoding fileIOEncoding = Encoding.Default;
        char[] chars = new char[] { theChar };
        if (fileIOEncoding.IsSingleByte)
        {
            buffer = new byte[1];
            int num3 = fileIOEncoding.GetBytes(chars, 0, 1, buffer,
            0);
            return buffer[0];
        }
        buffer = new byte[2];
        if (fileIOEncoding.GetBytes(chars, 0, 1, buffer, 0) == 1)
        {
            return buffer[0];
        }
        if (BitConverter.IsLittleEndian)
        {
            byte num4 = buffer[0];
            buffer[0] = buffer[1];
            buffer[1] = num4;
        }
        num = BitConverter.ToInt16(buffer, 0);
    }
    catch (Exception exception)
    {
        throw exception;
    }
    return num;
}


Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

GeneralRe: String implementation in .NET Framework Pin
J4amieC4-Nov-08 5:26
J4amieC4-Nov-08 5:26 
GeneralRe: String implementation in .NET Framework Pin
DaveyM694-Nov-08 5:32
professionalDaveyM694-Nov-08 5:32 
AnswerRe: String implementation in .NET Framework Pin
PIEBALDconsult4-Nov-08 4:34
mvePIEBALDconsult4-Nov-08 4:34 
GeneralRe: String implementation in .NET Framework Pin
J4amieC4-Nov-08 5:28
J4amieC4-Nov-08 5:28 
QuestionHow to create my own button [usercontrol? or what?] Pin
Matjaz-xyz4-Nov-08 2:34
Matjaz-xyz4-Nov-08 2:34 
AnswerRe: How to create my own button [usercontrol? or what?] Pin
cyber-drugs4-Nov-08 3:34
cyber-drugs4-Nov-08 3:34 
GeneralRe: How to create my own button [usercontrol? or what?] Pin
Matjaz-xyz4-Nov-08 3:41
Matjaz-xyz4-Nov-08 3:41 
GeneralRe: How to create my own button [usercontrol? or what?] Pin
cyber-drugs4-Nov-08 3:54
cyber-drugs4-Nov-08 3:54 
AnswerRe: How to create my own button [usercontrol? or what?] [modified] Pin
DaveyM694-Nov-08 3:47
professionalDaveyM694-Nov-08 3:47 
QuestionHow do display a form in a seperate thread Pin
EliottA4-Nov-08 2:27
EliottA4-Nov-08 2:27 
AnswerRe: How do display a form in a seperate thread Pin
dybs4-Nov-08 2:41
dybs4-Nov-08 2:41 
AnswerRe: How do display a form in a seperate thread Pin
Dave Kreskowiak4-Nov-08 3:35
mveDave Kreskowiak4-Nov-08 3:35 
GeneralRe: How do display a form in a seperate thread Pin
EliottA4-Nov-08 5:21
EliottA4-Nov-08 5:21 
GeneralRe: How do display a form in a seperate thread Pin
Dave Kreskowiak4-Nov-08 5:55
mveDave Kreskowiak4-Nov-08 5:55 
QuestionHow to read End of Line in C# Pin
Miss_hacker4-Nov-08 2:19
Miss_hacker4-Nov-08 2:19 
AnswerRe: How to read End of Line in C# Pin
#realJSOP4-Nov-08 2:22
mve#realJSOP4-Nov-08 2:22 
GeneralRe: How to read End of Line in C# Pin
Ashfield4-Nov-08 2:42
Ashfield4-Nov-08 2:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.