Click here to Skip to main content
15,886,362 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: code for adding bios date in vb.net Pin
Luc Pattyn18-Jul-09 4:49
sitebuilderLuc Pattyn18-Jul-09 4:49 
AnswerRe: code for adding bios date in vb.net Pin
dan!sh 18-Jul-09 5:24
professional dan!sh 18-Jul-09 5:24 
GeneralRe: code for adding bios date in vb.net Pin
yogendrasalunke18-Jul-09 5:31
yogendrasalunke18-Jul-09 5:31 
QuestionEnum value calculation using chars [modified] Pin
DaveyM6918-Jul-09 0:51
professionalDaveyM6918-Jul-09 0:51 
AnswerRe: Enum value calculation using chars Pin
Luc Pattyn18-Jul-09 1:18
sitebuilderLuc Pattyn18-Jul-09 1:18 
GeneralRe: Enum value calculation using chars Pin
DaveyM6918-Jul-09 1:34
professionalDaveyM6918-Jul-09 1:34 
GeneralRe: Enum value calculation using chars Pin
Luc Pattyn18-Jul-09 1:42
sitebuilderLuc Pattyn18-Jul-09 1:42 
GeneralRe: Enum value calculation using chars Pin
DaveyM6918-Jul-09 1:56
professionalDaveyM6918-Jul-09 1:56 
Thanks Big Grin | :-D

It's actually an enum that represents the standard reference identifiers for a stratum 1 NTP server in a NTP/SNTP packet.

This part of the packet is 4 bytes, with each byte representing a character of an abreviation (zero padded if all four characters aren't required).

I have a method that does byte[34] to string conversion, but I only want to use that if it's a non standard one. The standard ones use the enum value as a key to get a more verbose string out of a dictionary value, the non standard ones just return the 4 character string.

I could just hardcode the UInt32 value into the enum directly as a number, but it's a little more descriptive in code to use the characters and bit shift, and of course there's no overhead either.

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)
Why are you using VB6? Do you hate yourself? (Christian Graus)

GeneralRe: Enum value calculation using chars Pin
Luc Pattyn18-Jul-09 2:12
sitebuilderLuc Pattyn18-Jul-09 2:12 
GeneralRe: Enum value calculation using chars Pin
DaveyM6918-Jul-09 2:26
professionalDaveyM6918-Jul-09 2:26 
GeneralRe: Enum value calculation using chars Pin
Luc Pattyn18-Jul-09 2:53
sitebuilderLuc Pattyn18-Jul-09 2:53 
GeneralRe: Enum value calculation using chars Pin
riced18-Jul-09 4:30
riced18-Jul-09 4:30 
QuestionPractice Pin
Noobie One18-Jul-09 0:07
Noobie One18-Jul-09 0:07 
AnswerRe: Practice Pin
riced18-Jul-09 0:22
riced18-Jul-09 0:22 
AnswerRe: Practice Pin
Luc Pattyn18-Jul-09 0:43
sitebuilderLuc Pattyn18-Jul-09 0:43 
AnswerRe: Practice Pin
Kevin McFarlane18-Jul-09 3:50
Kevin McFarlane18-Jul-09 3:50 
AnswerRe: Practice Pin
Noobie One18-Jul-09 8:56
Noobie One18-Jul-09 8:56 
GeneralRe: Practice Pin
Luc Pattyn18-Jul-09 9:12
sitebuilderLuc Pattyn18-Jul-09 9:12 
GeneralRe: Practice Pin
Johan Hakkesteegt19-Jul-09 21:52
Johan Hakkesteegt19-Jul-09 21:52 
QuestionNested Gridview Pin
Mariam_siahpar17-Jul-09 20:02
Mariam_siahpar17-Jul-09 20:02 
Questionenable/disable network adapter Pin
ivo7517-Jul-09 7:50
ivo7517-Jul-09 7:50 
AnswerRe: enable/disable network adapter Pin
Rozis17-Jul-09 12:09
Rozis17-Jul-09 12:09 
AnswerRe: enable/disable network adapter Pin
Tom Deketelaere17-Jul-09 12:09
professionalTom Deketelaere17-Jul-09 12:09 
GeneralRe: enable/disable network adapter Pin
ivo7517-Jul-09 23:56
ivo7517-Jul-09 23:56 
QuestionNeed Conversion help Pin
User 584223717-Jul-09 5:59
User 584223717-Jul-09 5:59 

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.