-
January 28th, 2013, 11:34 AM
#1
For loop Issue
Hi im currently pursuing engineering and im learning C sharp as it was widely used for framework projects...
Im trying to write a program and im stuck with the following:-
scenario:
byte msg[]
for(i=0;i<12;i++)
{
string msg1;
msg1= msg[i].ToString();
Assert.Areequal("some statement",the message is,msg1,0)
}
The output is coming like this:-
0
0
0
1
0
0
0
0
12
32
24
255
i.e im reading every byte of the message i.e there are totally twelve bytes..
i need to get every byte mentioned above in multiple strings for eg byte 1 in msg1 , byte 2 in msg2 , byte 3 in msg3 like that..but i cant able to get the bytes..for eg if i need to get the byte 1 alone to be printed i cant figure out to do that..Please guide me..thanks.......
PS :- similarly whether it is possible to print the complete message together for eg 00010000123224255 in a single instance
-
January 28th, 2013, 11:54 AM
#2
Re: For loop Issue
That doesn't appear to be Visual C++ code as it's discussed in this forum. Go to the managed C++ forum and post complete code.
-
January 28th, 2013, 12:02 PM
#3
Re: For loop Issue
Hi im currently pursuing engineering and im learning C sharp
This is c# code - not c++ !! You need the dedicated c# forum. Can moderator move this post please?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|