Click here to Skip to main content
15,891,567 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can't delete a registry value! Pin
Daniel Turini3-Oct-03 10:29
Daniel Turini3-Oct-03 10:29 
GeneralRe: Can't delete a registry value! Pin
Alvaro Mendez3-Oct-03 10:40
Alvaro Mendez3-Oct-03 10:40 
GeneralNow I can. Pin
Alvaro Mendez3-Oct-03 11:08
Alvaro Mendez3-Oct-03 11:08 
GeneralRe: Can't delete a registry value! Pin
Alex Korchemniy4-Oct-03 11:03
Alex Korchemniy4-Oct-03 11:03 
GeneralMD5 HashCode Pin
pahluwalia3-Oct-03 8:07
pahluwalia3-Oct-03 8:07 
GeneralRe: MD5 HashCode Pin
Daniel M. Edwards3-Oct-03 9:50
Daniel M. Edwards3-Oct-03 9:50 
QuestionEvents not firing from collections? Pin
FruitBatInShades3-Oct-03 4:26
FruitBatInShades3-Oct-03 4:26 
GeneralByte Arrays Pin
MrEyes3-Oct-03 0:49
MrEyes3-Oct-03 0:49 
Apologies for the slightly vague title of this thread, but I was hard pushed to find a decently descriptive title.

I am attempting to convert a byte array into a string, which in itself if relatively simple - The output strings look something like this :

1.3.6.1.4.1.1

The way I am doing this at the moment is fairly simple :

char[] cha = Encoding.ASCII.GetChars(byte_array);

Then I convert each cha[*] to a string, and voila, I have my full string.

The problem is that if the value of one of the nodes (between the '.') is greater than 127 it is converted to a 2-byte signed integer value. So if the string I am after is :

1.3.6.1.4.1.6347

My rather simple method of converting is useless, these signed integer values can (and will) appear at any of the nodes in the string - so I am looking for some sort of guidance on create a parser to acheive this.

p.s Just incase your curious, I am attempting to decode SNMP OIDs

post.mode = signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
GeneralRe: Byte Arrays Pin
Mattias Olgerfelt3-Oct-03 1:04
Mattias Olgerfelt3-Oct-03 1:04 
GeneralRe: Byte Arrays Pin
MrEyes3-Oct-03 2:24
MrEyes3-Oct-03 2:24 
GeneralRe: Byte Arrays Pin
Daniel Turini3-Oct-03 5:45
Daniel Turini3-Oct-03 5:45 
GeneralAxBrowser/mshtml annoyances Pin
mephist2-Oct-03 16:07
mephist2-Oct-03 16:07 
GeneralCreating a virtual drive Pin
jij@esenet.dk2-Oct-03 10:32
jij@esenet.dk2-Oct-03 10:32 
GeneralRe: Creating a virtual drive Pin
Blake Coverett2-Oct-03 20:18
Blake Coverett2-Oct-03 20:18 
GeneralRe: Creating a virtual drive Pin
James Simpson6-Oct-03 1:01
James Simpson6-Oct-03 1:01 
GeneralRe: Creating a virtual drive Pin
jij@esenet.dk7-Oct-03 7:04
jij@esenet.dk7-Oct-03 7:04 
GeneralRe: Creating a virtual drive Pin
jij@esenet.dk7-Oct-03 7:05
jij@esenet.dk7-Oct-03 7:05 
GeneralString question Pin
Mike Ellison2-Oct-03 10:24
Mike Ellison2-Oct-03 10:24 
GeneralRe: String question Pin
Loki2-Oct-03 10:38
Loki2-Oct-03 10:38 
GeneralRe: String question Pin
Nathan Blomquist2-Oct-03 10:41
Nathan Blomquist2-Oct-03 10:41 
GeneralRe: String question Pin
Nathan Blomquist2-Oct-03 10:40
Nathan Blomquist2-Oct-03 10:40 
GeneralRe: String question Pin
Daniel Turini2-Oct-03 11:08
Daniel Turini2-Oct-03 11:08 
GeneralRe: String question Pin
Mike Ellison2-Oct-03 11:11
Mike Ellison2-Oct-03 11:11 
GeneralRe: String question Pin
Nick Parker2-Oct-03 13:14
protectorNick Parker2-Oct-03 13:14 
GeneralRe: String question Pin
Mike Ellison2-Oct-03 13:32
Mike Ellison2-Oct-03 13:32 

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.