hex zu ascii; danach ascii zu int ...?

public string ConvertHexaStringToAsciiString (string _szStr)
                {
                        int iOffset = 0;
                        string szResult = String.Empty;
                        byte[] abytesText = new byte [_szStr.Length /2];

                        for (int i = 0; i < _szStr.Length /2; i++)
                        {
                                abytesText [iOffset] = 
(byte)Int32.Parse(_szStr.Substring(i*2,2),
System.Globalization.NumberStyles.HexNumber);
                                iOffset++;
                        }

                        char[] asciiChars = new 
char[Encoding.ASCII.GetCharCount(abytesText, 0,
abytesText.Length)];
                        Encoding.ASCII.GetChars(abytesText, 0, 
abytesText.Length, asciiChars, 0);

                        szResult = new string(asciiChars);
                        return szResult;
                }

gruss sabine



-----Ursprungliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Auftrag von Rene Drescher-Hackel
Gesendet: Freitag, 26. November 2004 19:59
An: [EMAIL PROTECTED]
Betreff: [Asp.net] #ff9933 - in Farbnamen umwandeln


Wie kann ich die Hex-Werte(zb. #ff9933) in einen Farbnamen umwandeln?

Rene


_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net

_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an