473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Hex Class

Hello,

Does anyone know where the class Hex is in the framework.
According to articles that I read it should be in
System.Security.Util, but I cannot find the Util
namespace.

Here is the link that shows this.
http://dotnet.di.unipi.it/Content/ss.../doxygen/fx/bc
l/hex_8cs-source.html
Nov 16 '05 #1
5 2831
Why just not to
MyString = Int64.Parse(MyValue,System.Globalization.NumberSty les.HexNumber)
?
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"BuddyWork" <an*******@discussions.microsoft.com> wrote in message
news:24*****************************@phx.gbl...
Hello,

Does anyone know where the class Hex is in the framework.
According to articles that I read it should be in
System.Security.Util, but I cannot find the Util
namespace.

Here is the link that shows this.
http://dotnet.di.unipi.it/Content/ss.../doxygen/fx/bc
l/hex_8cs-source.html

Nov 16 '05 #2
Hello Tamir,

I need to convert a string to byte[] which is what the
function DecodeHexString() does.

Thanks,
-----Original Message-----
Why just not to
MyString = Int64.Parse (MyValue,System.Globalization.NumberStyles.HexNumb er)?
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"BuddyWork" <an*******@discussions.microsoft.com> wrote in messagenews:24*****************************@phx.gbl...
Hello,

Does anyone know where the class Hex is in the framework. According to articles that I read it should be in
System.Security.Util, but I cannot find the Util
namespace.

Here is the link that shows this.
http://dotnet.di.unipi.it/Content/ss.../doxygen/fx/bc l/hex_8cs-source.html

.

Nov 16 '05 #3
On Thu, 1 Jul 2004 02:17:06 -0700, "BuddyWork"
<an*******@discussions.microsoft.com> wrote:
Hello Tamir,

I need to convert a string to byte[] which is what the
function DecodeHexString() does.

Thanks,

<snip>

I vaguely remember doing some stuff like that using the
system.text.encoding class perhaps
Nov 16 '05 #4
Hi,

I not sure whether there is a hex class in .NET.

But this is how i do:

String -> Char[] -> Byte[] -> Hex (to display)

// convert string to character array
char [] keyValue = KeyTextBox.Text.ToCharArray();

// convert character array to byte array
byte [] keyByte = Encoding.ASCII.GetBytes(keyValue);

// Format the byte into hexadecimal
string str = "";
str += string.Format("{0:x2}", keyByte[i]);

To convert Hex back to Bytes:

you can look into Byte.Parse(,);

Correct me if i am wrong. Thanks.
--
Regards,
Chua Wen Ching :)
"BuddyWork" wrote:
Hello Tamir,

I need to convert a string to byte[] which is what the
function DecodeHexString() does.

Thanks,
-----Original Message-----
Why just not to
MyString = Int64.Parse

(MyValue,System.Globalization.NumberStyles.HexNumb er)
?
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"BuddyWork" <an*******@discussions.microsoft.com> wrote

in message
news:24*****************************@phx.gbl...
Hello,

Does anyone know where the class Hex is in the framework. According to articles that I read it should be in
System.Security.Util, but I cannot find the Util
namespace.

Here is the link that shows this.
http://dotnet.di.unipi.it/Content/ss.../doxygen/fx/bc l/hex_8cs-source.html

.

Nov 16 '05 #5
byte[] bytes = Encoding.UTF8.GetBytes(somString);

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"BuddyWork" <an*******@discussions.microsoft.com> wrote in message
news:24*****************************@phx.gbl...
Hello Tamir,

I need to convert a string to byte[] which is what the
function DecodeHexString() does.

Thanks,
-----Original Message-----
Why just not to
MyString = Int64.Parse

(MyValue,System.Globalization.NumberStyles.HexNumb er)
?
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"BuddyWork" <an*******@discussions.microsoft.com> wrote

in message
news:24*****************************@phx.gbl...
Hello,

Does anyone know where the class Hex is in the framework. According to articles that I read it should be in
System.Security.Util, but I cannot find the Util
namespace.

Here is the link that shows this.
http://dotnet.di.unipi.it/Content/ss.../doxygen/fx/bc l/hex_8cs-source.html

.

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fernando Rodriguez | last post by:
Hi, I need to traverse the methods defined in a class and its superclasses. This is the code I'm using: # An instance of class B should be able to check all the methods defined in B #and A,...
18
by: John M. Gabriele | last post by:
I've done some C++ and Java in the past, and have recently learned a fair amount of Python. One thing I still really don't get though is the difference between class methods and instance methods. I...
1
by: Oplec | last post by:
Hi, I'm learning C++ as a hobby using The C++ Programming Language : Special Edition by Bjarne Stroustrup. I'm working on chpater 13 exercises that deal with templates. Exercise 13.9 asks for me...
13
by: Bryan Parkoff | last post by:
I have created three classes according to my own design. First class is called CMain. It is the Top Class. Second class and third class are called CMemory and CMPU. They are the sub-classes....
9
by: Banaticus Bart | last post by:
I wrote an abstract base class from which I've derived a few other classes. I'd like to create a base class array where each element is an instance of a derived object. I can create a base class...
8
by: Bryan Parkoff | last post by:
I find an interesting issue that one base class has only one copy for each derived class. It looks like that one base class will be copied into three base classes while derived class from base...
21
by: Jon Slaughter | last post by:
I have a class that is basicaly duplicated throughout several files with only members names changing according to the class name yet with virtually the exact same coding going on. e.g. class...
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
3
by: Hamilton Woods | last post by:
Diehards, I developed a template matrix class back around 1992 using Borland C++ 4.5 (ancestor of C++ Builder) and haven't touched it until a few days ago. I pulled it from the freezer and...
0
by: emin.shopper | last post by:
I had a need recently to check if my subclasses properly implemented the desired interface and wished that I could use something like an abstract base class in python. After reading up on metaclass...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.