vb.net - .Net Error LINQ - new classname with -


why vs keep saying add this?

sub new()     ' todo: complete member initialization  end sub 

since have constructor takes parameters, default, parameterless constructor not created automatically.

your linq statement not calling parameterized constructor, need parameterless constructor.

basically, when code this:

select new communityevent {.day = srecord(0), etc. } 

what gets generated this

dim obj new communityevent()   'uses parameterless constructor obj.day = srecord(0) 'etc. 

when remove communityevent with part, doesn't use class, creates anonymous type instead.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -