In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "what is the function of the SizeConst of the array of MarshalAs". In the daily operation, I believe that many people have doubts about the role of the SizeConst of the array of MarshalAs. The editor consulted all kinds of data and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "what is the use of the SizeConst of the array of MarshalAs?" Next, please follow the editor to study!
[StructLayout (LayoutKind.Sequential)] class CLS {public int id; public float value; [MarshalAs (UnmanagedType.ByValArray,SizeConst=10,ArraySubType=UnmanagedType.Struct)] public Point [] ps; [MarshalAs (UnmanagedType.LPStr)] public string msg; [MarshalAs (UnmanagedType.ByValArray,SizeConst=5,ArraySubType=UnmanagedType.LPStr)] public string [] msgs } Console.WriteLine ("Number of bytes needed by a CLS object: {0}", Marshal.SizeOf (typeof (CLS); CLS cls = new CLS (); string [] s = new string [10]; for (int I = 0 X I < 10 x I +) {s [I] = "demo" + I;} cls.msgs = s For (int iTuno Bandi)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.