Click here to Skip to main content
15,883,603 members

Articles by jarvisa (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.00

General Programming
3 Feb 2012   Updated: 4 Feb 2012   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 8,490     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Programming Languages
30 Aug 2011   Updated: 30 Aug 2011   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: CPOL    Views: 7,820     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
"we cannot pass a Type as a function parameter" ???Yes we can. Just look at the parameter of Enum.GetValues for example._______Generic functions are unnecessary here. Just use Object.GetType to, um, get the type.private Enum GetNextEnum(object currentlySelectedEnum){ Type...
7 Feb 2012   Updated: 7 Feb 2012   Rating: 4.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 8,820     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Re-coded using LINQ. Stores the actual enum values in the combobox.public static void SetEnumValues(ComboBox cb){ Type t = typeof(T); if (!t.IsEnum) throw new ArgumentException("Only Enum types can be set"); cb.DisplayMember = "Key"; cb.ValueMember =...
9 May 2011   Updated: 9 May 2011   Rating: 2.00/5    Votes: 2   Popularity: 0.60
Licence: CPOL    Views: 8,800     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
ComboBox items do not have to be strings.The combobox calls ToString on each object in Items so simply add the enum values to the combobox.using System;using System.Drawing;using System.Windows.Forms;namespace Anchor_Form{ public class Form1 : Form { public...
Web Development
2 Nov 2010   Updated: 13 Nov 2010   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: CPOL    Views: 6,052     Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
public void ControlStatus(Control control, bool isDisable){ foreach (Control c in control.Controls) if (c.HasControls()) ControlStatus(c, isDisable); else { WebControl wc = c as WebControl; if (wc != null) ...

Average reference rating:

No reference articles have been posted.

Average project rating:

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