Coding.Creed
Coding.Creed

Reputation: 13

Convert a struct from C++ to C#

Hi I'm trying to convert a C++ code to a C#, I have searched for a few solutions on the internet, but I can't seem to get any of the results I want. Can anyone help me? Thanks.

The following code is a C++ code.

typedef unsigned char uint8;
typedef int sint32;
typedef struct BY_BITMAP
{
    sint32 biWidth;      
    sint32 biHeight;     
    sint32 biBitCount;  
    sint32 bfSize;       
    sint32 BytesPerLine; 
    uint8 **ScanLine;    
    uint8 *buffer;       
}BY_BITMAP;

Upvotes: 0

Views: 242

Answers (1)

AngYC
AngYC

Reputation: 3903

If you just want a conversion, I think this is the closest of what you want to achieve?

public struct BY_BITMAP {
    public int biWidth;
    public int biHeight;
    public int biBitCount;
    public int bfSize;
    public int BytesPerLine;
    public byte[][] ScanLine;
    public byte[] buffer;
}

Upvotes: 1

Related Questions