J
Jake
I am converting VB.Net code to C#
Module Test
Public Function GetStrFromByte() As String
Dim tmpByte As Byte()
Dim tmpByte1 As Byte()
...
tmpByte = RandomBytes(27)
tmpByte1 = tmpByte
FillByte(tmpByte)
...
End Function
Public Sub FillByte(ByRef bytes() As Byte)
...
bytes= RandomBytes(27)
End Sub
...
I convert this so
public class Test
{
public string GetStrFromByte()
{
byte[] tmpByte = null;
byte[] tmpByte1 = null;
...
tmpByte = RandomBytes(27);
tmpByte1 = tmpByte;
FillByte(ref tmpByte)
...
}
public void FillByte(ref byte[] bytes)
{
...
bytes = RandomBytes(27);
}
In VB.Net I get correct values so that tmpByte have the first RandomBytes
run result and tmpByte1 the second RandomBytes run result.
In C# happen a odd think just after runing FillByte both tmpByte and
tmpByte1 get same the second run RandomBytes result.
What I have been missing???
Thanks in Advance,
jake
Module Test
Public Function GetStrFromByte() As String
Dim tmpByte As Byte()
Dim tmpByte1 As Byte()
...
tmpByte = RandomBytes(27)
tmpByte1 = tmpByte
FillByte(tmpByte)
...
End Function
Public Sub FillByte(ByRef bytes() As Byte)
...
bytes= RandomBytes(27)
End Sub
...
I convert this so
public class Test
{
public string GetStrFromByte()
{
byte[] tmpByte = null;
byte[] tmpByte1 = null;
...
tmpByte = RandomBytes(27);
tmpByte1 = tmpByte;
FillByte(ref tmpByte)
...
}
public void FillByte(ref byte[] bytes)
{
...
bytes = RandomBytes(27);
}
In VB.Net I get correct values so that tmpByte have the first RandomBytes
run result and tmpByte1 the second RandomBytes run result.
In C# happen a odd think just after runing FillByte both tmpByte and
tmpByte1 get same the second run RandomBytes result.
What I have been missing???
Thanks in Advance,
jake