This error (CS0143) occurs if the class only defines an internal constructor and you try to instantiate it from another assembly.
public class MyClass
{
internal MyClass()
{
}
}
More Related Contents:
- Virtual member call in a constructor
- Calling the base constructor in C#
- Why must “stride” in the System.Drawing.Bitmap constructor be a multiple of 4?
- What’s the difference between an object initializer and a constructor?
- How to do constructor chaining in C#
- Why can’t the C# constructor infer type?
- Is there a generic constructor with parameter constraint in C#?
- C# member variable initialization; best practice?
- Interface defining a constructor signature?
- Call one constructor from another
- ‘UserControl’ constructor with parameters in C#
- What setup code should go in Form Constructors versus Form Load event?
- Using C# reflection to call a constructor
- Is there an alternative to bastard injection? (AKA poor man’s injection via default constructor)
- Inheritance with base class constructor with parameters [duplicate]
- Struct constructor: “fields must be fully assigned before control is returned to the caller.”
- Why does the c# compiler emit Activator.CreateInstance when calling new in with a generic type with a new() constraint?
- DataContractSerializer doesn’t call my constructor?
- Is the “textual order” across partial classes formally defined?
- what is ‘this’ constructor, what is it for
- Will the base class constructor be automatically called?
- What is the use of static constructors?
- Automatically implemented property in struct can not be assigned
- How to inherit constructors?
- Calling constructor from other constructor in same class
- base() and this() constructors best practices
- Is generic constructor in non-generic class supported?
- Cycle in the struct layout that doesn’t exist
- What is the function of the “this” keyword in a constructor?
- a constructor as a delegate – is it possible in C#?