c# - The type '...' has no constructors defined -


i'm noticing compiler error the type '...' has no constructors defined generated when erroneously attempt instantiate particlar class.

it lead me wonder how go writing own class precipitate message when attempted instantiate it.

so code below, need myclass?

namespace mynamespace {     class program     {         static void main(string[] args)         {             myclass mc = new myclass();         }     }      class myclass     {         myclass()         {         }     } } 

this error (cs0143) occurs if class defines internal constructor , try instantiate assembly.

public class myclass {     internal myclass()     {     } } 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -