c# - Unable to run Form -
i've been coding generic dictionary , have came across problem when trying run it.
when run program error: the type or namespace name 'mainform' not found (are missing using directive or assembly reference?)
here program.cs code:
namespace criminalrecords { class program { [stathread] static void main(string[] args) { /// <summary> /// main entry point application. /// </summary> { application.enablevisualstyles(); application.setcompatibletextrenderingdefault(false); application.run(new mainform()); } } } } the error appears because of mainform name of form. question causing , how can fix it?
your program class defined in criminalrecords namespace. unless mainform part of namespace, you'll error.
you can either add using namespacecontainingmainform; @ top of file, or qualify name of mainform namespace.
Comments
Post a Comment