Misleading compiler error “is a ‘type’ but is used like a ‘variable'”

The following C# line to call AutoFixture method
Caused Error     63     ‘System.Collections.Generic.List<System.Collections.Generic.List<BusinessEntities.FlightItem>>’ is a ‘type’ but is used like a ‘variable’     
It wasn’t obvious, that closing ‘>’ was missing.
 I believe  that compiler can recognize and provide better error message.

Cannot register the URL prefix ‘https…” when physical folder was deleted

Afrer iisreset  on production server I’ve got the error
“Cannot register the URL prefix ‘https://*:443/OldFolder/’ for site ‘1’. The site has been deactivated. “
The problem was that IIS folder still existed, when physical folder was deleted.
Only after I deleted the virtual folder, I was able to start web site. 
Different reasons to see the same errors are described in
http://support.microsoft.com/kb/890015 ” You receive a “The process cannot access the file because it is being used by another process” error message when you try to start a Web site in the Internet Information Services MMC snap-in”
http://forums.iis.net/t/1116890.aspx “are you using Skype? Well, than check whether in Skypes’ Advanced- Connection- Settings the ‘Use port 80 and 443 as alternatives for incoming connections’ checkbox is not checked.”

Function to Convert ASP.NET bool to JavaScript bool.

I was generating some JavaScript in the server code and found that bool.ToString() doesn’t create string that JavaScript expects as boolean- .Net uses first letter as capital True/False. Then I found in my own class, that I’ve wrote helper function a long time ago:

public static string JSToString(bool bValue)


                  return bValue.ToString().ToLower();



WaitAll to support calls from WindowsForms

We have multi-threading application that uses WaitHandle.WaitAll methods. It works fine, when called from ASP.NET, but when it is called from WinForms test harness, it causes the error “WaitAll for multiple handles on an STA thread is not supported.”. I’ve included the workaround and moved code to helper function.

However I needed to call the function with different parameters List<ManualResetEvent> and List<WaitHandle> . Even if ManualResetEvent is derived from WaitHandle, there is no implicit casting. Threads

Question regarding Generics and Inheritance and Casting List<> of derived class to List<> of base class? pointed me to ConvertAll method of List<> generic. And the article Introduction to anonymous methods in C#  helped me to use anonymous delegate to reduce code. 
The final helper class is shown below” 


public class ThreadingHelper


        public static bool WaitAll(List<ManualResetEvent> eventList , int millisecondsTimeout)

        {//Casting List<> of derived class to List<> of base class? see http://www.thescripts.com/forum/thread276346.html

            //new Converter<ManualResetEvent, WaitHandle>(ConvertDelegate));


            //and http://www.theserverside.net/tt/articles/showarticle.tss?id=AnonymousMethods

            List<WaitHandle> waitHandles = eventList.ConvertAll<WaitHandle>( 

                    delegate(ManualResetEvent ev) { return (WaitHandle)ev; });

           return WaitAll( waitHandles, millisecondsTimeout);


        public static bool WaitAll(List<WaitHandle> waitHandles, int millisecondsTimeout)


            bool bRet=true;

            //to avoid “WaitAll for multiple handles on an STA thread is not supported.” SEE http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework/topic28609.aspx

            //alternative solutions described in http://www.issociate.de/board/post/250510/WaitAll_for_multiple_handles_on_an_STA_thread_is_not_supported.html

            if (Thread.CurrentThread.GetApartmentState() == ApartmentState.STA)

            {//usually happens when tested from TestHarness or NUnit

                foreach (WaitHandle handle in waitHandles)


                    bRet |=handle.WaitOne();





                if (millisecondsTimeout > 0)


                    bRet=WaitHandle.WaitAll(waitHandles.ToArray(), millisecondsTimeout, false);//








            return bRet;




Ability to request e-mail updates for Google Groups thread.

When I am posting question to one of news groups, it always desireable to get notification if anyone replied to the thread.
Recently I’ve noticed, that Google Groups have this facility.

As it is described in the Google Groups Tip:
At the top of the thread of interest, to the right of the thread title (what you or the author named the thread), click “more options”. Then choose “email updates to me”. You will now receive an email for any postings to that thread. A small mail icon will appear, next to the “rating star” for the thread, the next time you view the thread.

Unfortunately,it seems, that only a few Google Groups has this feature available. It is not available for most -Usenet- groups.

Alternatively, you can create  ‘Groups’ alert, but it required more work to specify filters.

I agree with Tipical Charlie, that it will be good to have a mechanism whereby you could say that any thread you create (and optionally any thread you contribute to) are automatically marked for  “email me updates”.
There was already a suggestion to Google Feature-requests.
And I’ve post this suggestion to Google Groups Guide – Groups Suggestions 

Gmail Labels do not support hierarchy,as Folders could.

I’ve started to use GMail. They have Labels instead of folders to organize e-mails. There are certainly benefits  in ability to have many labels for one item. However I feel folders are more familiar  for me (and other   people ).
In particular,  I am missing ability to organize hierarchy-i.e. sub-folders within folders.
I’ve posted the suggestion to Gmail discussion group.

Update Note: I found a special Google Feature requests group. It looks that it is a good place to post suggesetions to Google.
But in the header it is noted, that  “this is not an official Google group”. Does Google employee reads the news group? Do they consider the suggestions? 
Also is the group only about GMail as it stated in the header. Or suggestions regarding other google sites can be post there?

Update: Also I found a relatively new suggestion Labels with Sub Labels. I second it.
I was adviced that official way for GMail suggestions is through https://services.google.com/inquiry/gmail_suggest/

By the way, I found a good tip about Bookmarking  Label in Gmail.



Link to Russian Bard Club in Melbourne.

It’s my second personal/social post in this technical blog.

I am participationg in Russian Bard Club “Southern Cross” . I’ve recently noticed that the club’s web site is not shown in Google. Even if it is out-of-date and not complete, it’s better to have it searchable, because at least some info can be interesting.  I hope that this link will help Google to crawl it.