In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how many overloads Assembly CreateInstance has, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
Assembly's CreateInstance has three overloads, and the first parameter needs to be the full class name represented by a string. The second parameter is a bool type. If true, it means that the * * parameters are case-insensitive.
The third: bit masking that affects how the search is performed. This value is a combination of bit flags in System.Reflection.BindingFlags.
/ / binder: an object that enables binding, parameter type enforcement, member invocation, and MemberInfo object retrieval through reflection. If binder is null, the default binder is used. / / args: an array of type Object containing the parameters to be passed to the constructor. This parameter array must be in terms of quantity, order, and type
Matches the parameters of the constructor to be called. If a default constructor is required, args must be an empty array or null.
/ / culture: an instance of CultureInfo used to control type enforcement. If this is null, the CultureInfo of the current thread is used. (for example, this is useful for converting a String representing 1000 to
The Double value is required because different cultures represent 1000 in different ways.
/ / activationAttributes: an array of one or more attributes that can participate in activation. Typically an array containing a single System.Runtime.Remoting.Activation.UrlAttribute object.
System.Runtime.Remoting.Activation.UrlAttribute specifies the URL required to activate the remote object. For a detailed description of client-activated objects, see client Activation.
The static method CreateInstance of the Activator class.
The * * parameter description of CreateInstance is the name of the assembly, and if null represents the current assembly, the second parameter indicates the name of the type to be created. Activator.CreateInstance returns an ObjectHandle object that must be Unwrap () once to return the Object type, which can be cast to the type we need (MathClass in this case). ObjectHandle is included in the System.Runtime.Remoting namespace, so you can see that it is Remoting-related, but in fact the ObjectHandle class is just a wrapper around the original type for marshaling.
Thank you for reading this article carefully. I hope the article "how many overloads of Assembly's CreateInstance" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.