Windows Azure Cloud Storage ermöglicht es Ihnen bereits ab 0,10€ pro GB/Monat die Vorteile der Cloud zu nutzen.
Willkommen bei dotnet-snippets.de! Snippet hinzufügen Login Registrieren
Snippets in der Datenbank: 1550 | Anzahl registrierter User: 1841 | Besucher online: 13
Hauptmenü
Home
Top Ten
Zufälliger Snippet
FAQs
.NET Community
dotnet-forum.de
dotnet-kicks.de
Social

RSS Feeds
Rss Alle Snippets
Rss C#
Rss VB.NET
Rss C++
Rss ASP.NET
Partner
Member of Microsoft Community Leader/Insider Program (CLIP)

Umwandlung von Hexadezimal <> Dezimal


Autor: Konstantin Gross
Sprache: C#
Bewertung:
noch nicht bewertet
Anzahl der Aufrufe: 24990
  
Kick it on dotnet-kicks.de  

Beschreibung:

Umwandlung von Hexadezimal <> Dezimal

Abgelegt unter: Hex, Hexa, Hexadezimal, Dez, Dezimal, Decimal, Hexadecimal.



C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Hexadezimal nach Dezimal
public static int HexToDec(string hexValue)
{
    return Int32.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
}

// Dezimal nach Hexadezimal
public static string DecToHex(int decValue)
{
    return string.Format("{0:x}", decValue);
}

// Benutzung
string hex = DecToHex(15);
int dec = HexToDec("f");
Sie haben Fragen zu diesem Snippet oder brauchen Hilfe bei der .NET Entwicklung?
Freundliche und kompetente Entwickler helfen Ihnen gern weiter im Forum für .NET Entwicklung.



Kommentare:
(Zum Schreiben von Kommentaren bitte anmelden.)



schlecht sehr gut
1 2 3 4 5 6 7 8 9 10
Nur angemeldete User können Snippets bewerten.