C# Struct No Parameterless Constructor? See what I need to accomplish

前端 未结 6 568
既然无缘
既然无缘 2020-12-15 08:06

I am using a struct to pass to an unmanaged DLL as so -

[StructLayout(LayoutKind.Sequential)]
        public struct valTable
        {
            public byt         


        
6条回答
  •  粉色の甜心
    2020-12-15 08:53

    For what you need to do you really need a class I think. A struct already implements a parameterless constructor by default which is why you cant define another one.

提交回复
热议问题