Sunday, April 15, 2012

Find was Stopped in Progress Visual Studio

Find was Stopped in Progress.
Visual Studio 2010.
Visual Studio 2005.

 Visual Studio has some known issues.  One of them is the inability to search something using Ctrl+Shift+F because of the following error:

"Find was stopped in progress".



Well, a very informative post can be found here but the solution is extremely simple:
Ctrl + ScrollLock will fix your problem :)

Have fun,
Elad Shalom,
CTO at ITweetLive.com

DataSet HasTables Method

DataSet Extentions.
Add Methods to Objects.

So, it's getting me tired to always right:
     if (ds != null && ds.Tables.Count > 0)
to make sure that a certain dataset really has tables inside.

So here is an extension I added to the DataSet object:
        public static bool HasTables(this DataSet ds)
        {
            if (ds != null && ds.Tables.Count > 0)
                return true;
 
            return false;
        }

Simple, yet efficient :)

Elad Shalom,
CTO at ITweetLive.com

DataTable HasRows Method

DataTable Extentions.
Add Methods to Objects.

So, it's getting me tired to always right:
     if (dt != null && dt.Rows.Count > 0)
to make sure that a certain table really have rows.

So here is an extension I added to the DataTable object:
        public static bool HasRows(this DataTable dt)
        {
            if (dt != null && dt.Rows.Count > 0) 
                return true;
 
            return false;
        }

Simple, yet efficient :)
Elad Shalom,
CTO at ITweetLive.com