Click here to Skip to main content
15,894,343 members

Articles by SergeyT2 (Tip/Tricks: 5)

Tip/Tricks: 5

RSS Feed

Average article rating:

No articles have been posted.

Average blogs rating:

No blogs have been submitted.

Average tips rating: 4.75

Desktop Programming
Windows Forms
21 Jun 2011   Updated: 21 Jun 2011   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 7,990     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
You can use Action instead of MethodInvoker as well. And ".Invoke" at the method is unnesessary.public static void ThreadSafeCall(this Control control, Action method){ if (control.InvokeRequired) { control.Invoke(method); } else { method(); ...
Programming Languages
C#
28 Dec 2010   Updated: 28 Dec 2010   Rating: 4.50/5    Votes: 4   Popularity: 2.71
Licence: CPOL    Views: 6,880     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
With System.Windows.Forms it's not necessary to pass the owner. You can use static property Cursor.Current.I use the following class in my projects:public sealed class WaitCursor : IDisposable{ private Cursor _SavedCursor; public WaitCursor() { _SavedCursor =...
18 Jul 2011   Updated: 18 Jul 2011   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 5,130     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
The codepublic static IEnumerable IfMatchWith(this IEnumerable myList, string itemToMatch){ foreach (var item in myList.Where(item => item == itemToMatch)) yield return item;}could be rewritten as:public static IEnumerable IfMatchWith(this...
20 Jul 2011   Updated: 20 Jul 2011   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 5,810     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
public static IEnumerable MakeAllLower(this IEnumerable myList){ foreach (var item in myList) yield return item.ToLower();}Could be rewritten as:public static IEnumerable MakeAllLower(this IEnumerable myList){ return myList.Select(item...
20 Jul 2011   Updated: 20 Jul 2011   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 4,450     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
myList.IfMatch...

Average reference rating:

No reference articles have been posted.

Average project rating:

No projects have been posted.
Software Developer
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.