|
-
December 16th, 2009, 09:44 AM
#1
Bug in C# compiler - InvalidProgramException, Basic Syntax
-
December 16th, 2009, 09:46 AM
#2
Re: Bug in C# compiler - InvalidProgramException, Basic Syntax
can a nested-class be derived from its parent class? and why would one want to do it? what is the purpose of doing this?
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback  you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
-
December 16th, 2009, 11:09 AM
#3
Re: Bug in C# compiler - InvalidProgramException, Basic Syntax
That code is probably what's causing the issue. Essentially what you're trying to do is execute code in B before the constructor from B has been run. That's illegal, hence the error. I'm surprised the compiler didn't give out.
www.monotorrent.com For all your .NET bittorrent needs
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
-
December 16th, 2009, 02:23 PM
#4
Re: Bug in C# compiler - InvalidProgramException, Basic Syntax
The point is not to make it work. The point is why compiler allows it and maybe some more meaningful exception should be thrown?
-
December 16th, 2009, 02:26 PM
#5
Re: Bug in C# compiler - InvalidProgramException, Basic Syntax
 Originally Posted by lukaszg
The point is not to make it work. The point is why compiler allows it and maybe some more meaningful exception should be thrown?
don't you think you should have mentioned it in you first post and not just pasting some links? then you wonder that we didn't guess your intentions.
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback  you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|