我在VB6中读了这段代码,如何在c#languge
中编写这段代码Type pix
b As Byte
g As Byte
R As Byte
End Type
Public img() As pix
wi=320
hi=240
ReDim img(wi, hi)
答案 0 :(得分:0)
public struct pix
{
public byte r;
public byte g;
public byte b;
}
public pix[,] img;
int wi = 320;
int hi = 240;
img = new pix[wi, hi];
如果您正在寻找ReDim Preserve
,请参阅此Redim Preserve in C#?
答案 1 :(得分:-2)
转到此website。您可以粘贴VB代码并单击C#作为输出,然后单击转换。你完成了。