| Array |
Shallu Gupta provided a rated reply on Wednesday, March 01, 2006 3:45 AM |
|
yeah you can do this..
see this example..
[CODE]
string [] test = new string[2];
test[0]= "first";
test[1]= "second";
[/CODE] |
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
| cannot convert string[] to char[] will occur know |
| Raja yashwanth Reddy Gunda replied on Wednesday, March 01, 2006 4:32 AM |
|
here this charecter array was defined in dll.
i want to use the dll in my application,for that the above i given that example.
can we that hexadecimal values as elements of an array. |
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
| convert hexadecimal values to char |
Pankaj Sharma provided a rated reply on Wednesday, March 01, 2006 4:45 AM |
|
Hi,
Is it this you need?
[CODE]
public struct Test
{
public char[] arrTest;
public Test(int intLen)
{
arrTest= new char[intLen];
}
}
//Declaring a struct object
Test temp = new Test(2);
//converting it into char
temp.arrTest[0]= Convert.ToChar(0x42);
Console.WriteLine(temp.arrTest[0]);
//It displays B on console.
[/CODE] |
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
| convert hexadecimal values to char |
| Pankaj Sharma replied on Wednesday, March 01, 2006 4:48 AM |
|
Hi,
Is it this you need?
[CODE]
public struct Test
{
public char[] arrTest;
public Test(int intLen)
{
arrTest= new char[intLen];
}
}
//Declaring a struct object
Test temp = new Test(2);
//converting it into char
temp.arrTest[0]= Convert.ToChar(0x42);
//It displays B on console.
Console.WriteLine(temp.arrTest[0]);
[/CODE] |
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
| clarification on the values saved in the example |
| Raja yashwanth Reddy Gunda replied on Wednesday, March 01, 2006 5:04 AM |
|
with reference to your answer
in c the values which are saved are passed as hexadecimal values to the calling position( i.e to the x25 Protocol) does the same happen in c#
I think that char (0x47) i.e char 66 i.e B will be passed this doesnot solve my problem |
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
|