473,569 Members | 3,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB - Byte.ToString(S tring) - format help

10 New Member
Hi, I've been converting a byte to a hex string using "X2" as the format. However, I've taken this directly from the web and being of the curious type I was wondering what other possible format parameters can be passed to the Byte.ToString(S tring) routine, and what they mean.

I can't seem to find anything in the usual places.

Thanks in advance.
Dec 13 '07 #1
1 1749
Plater
7,872 Recognized Expert Expert
MSDN has a whole list of them.
Look up the .ToString(strin g) overload for int, there are links to the NumberFormatInf o and other strings you can use.
Dec 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

14
2452
by: Walter Dnes (delete the 'z' to get my real address | last post by:
I took a C course some time ago, but I'm only now beginning to use it, for a personal pet project. My current stumbling-block is finding an efficient way to find a match between the beginning of a "counted" string and data in a binary file. Given... #include <stdio.h> int main(int argc, char *argv) { char bstring;
8
2045
by: FrzzMan | last post by:
How to convert back a string that have converted to byte using System.Text.Encoding.UTF8.GetBytes() string StringData = "This is a string"; byte ConvertedString = System.Text.Encoding.UTF8.GetBytes(StringData); Now, how can I convert ConvertedString to "This is a string" string again?
0
1005
by: zoneal | last post by:
I used DirectSound to record voice from microphone and the variable is set up as: Dim voiceBuffer() As Byte As the voiceBuffer is in byte format, I cannot play the voice using DirectSound through speakers.
0
984
by: John Kortis | last post by:
Have an application that is predicated on writing to byte fields in an sql database I use these structures to pass streams in threads that execute methods. the xml stream to Hex as in the hex(20), decimal(32) streams as two text characters "20" I have classes that convert the data back and forth but when I set my byte
1
2500
by: Eugene Anthony | last post by:
Private Function BStr2UStr(BStr) 'Byte string to Unicode string conversion Dim lngLoop BStr2UStr = "" For lngLoop = 1 to LenB(BStr) BStr2UStr = BStr2UStr & Chr(AscB(MidB(BStr,lngLoop,1))) Next End Function Private Function UStr2Bstr(UStr)
13
3319
by: Angus | last post by:
Hello I have a stream of bytes - unsigned char*. But the 'string' may contain embedded nulls. So not like a traditional c string terminated with a null. I need to calculate the length of these arrays but can't use strlen because it just stops counting at the first null it finds. so how to do it? Angus
13
7276
by: Angus | last post by:
Hello I have a load of bytes like this: unsigned char mybyte = {0xa1, 0x14, 0x02, 0x01, 0x01, 0x02, 0x01, 0x0a, 0x30, 0x0c, 0x80, 0x03, 0x32, 0x30, 0x31, 0x62, 0x05, 0x80, 0x03, 0x32, 0x30, 0x32};
15
4347
by: Steve | last post by:
Hi All, I have a registration code that currently has 4 bytes that are unused. I'd like to store a future date in those 4 bytes. Is there a way to convert a date to a 4 byte string? When I do something like this, string stringDate = DateTime.Parse("1/15/2210").ToBinary().ToString("X");
1
2000
by: Slippy27 | last post by:
How do I test a byte string in Python? I want to manually convert (no libraries or functions) a UTF-8 string into UTF-16. My basic solution is to read from the stream some number of UTF-8 bytes, convert them into codepoints, then convert those codepoints into UTF-16 bytes. I want to code this myself, but I don't understand how to test the...
0
7930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.