I realise this is a late answer, so maybe you've already figured this out. But maybe it's still worth something, so here goes:
I think the short answer is that Yield is absolutely genius. The 'classic' way as you put it actually is the same implementation over and over again, where only the return value varies. What yield does for you is that it allows you to construct an IEnumerable directly from a function (using Yield statements), such that every time MoveNext() is called, the function takes off where it left off until the next Yield statement.
So, yes, you can just use yield whenever you want I think the only possible issue with it is that it's probably slower than a proper custom ('classic') implementation, so if you have A LOT of elements AND you notice a performance bottleneck in enumeration THEN you might consider getting your hands dirty.
I'm just writing some instructions for installing a .NET COM component.
The first steps are to use regasm and gacutil, but these don't seem to be distributed with the actual framework, and you need to use a version that matches your .NET v or above (i.e. can't use a v2 regasm with a v4 dll).
So I want to say where you can get a copy from, but what 'package' contains these to components? is it the .NET or Windows SDKs?
I'm developing a web tool and I started using asp.net with c# ,, an important part of the code is already written in c++ , I was looking and searching around and I kind of understood that I can use c++ as the web development language. Is this true ?
this is my first time developing a web tool, sorry
It's a royal pain in the ass, but it can be done. You have to use Managed C++ (C++/CLI), but it can be done. There are no ASP.NET templates so you have to write every tiny bit of code and wire up everything yourself.
It's really not worth the pain. You're not getting that much of a performance bost to make it worth the trouble. If there are critical pieces of code that must be hand optimized, then you can write your critical code into components and use those in the C# or VB.NET code for the site.
I played around with it some time back and it looked pretty promising.
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.