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

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

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

google shop client API returns 400 bad request error while adding an item -