Click here to Skip to main content
15,917,176 members
Home / Discussions / C#
   

C#

 
GeneralRe: Convert Word Doc to Byte Pin
Pete O'Hanlon9-Aug-12 0:52
mvePete O'Hanlon9-Aug-12 0:52 
GeneralRe: Convert Word Doc to Byte Pin
lmoelleb9-Aug-12 5:27
lmoelleb9-Aug-12 5:27 
GeneralRe: Convert Word Doc to Byte Pin
Pete O'Hanlon9-Aug-12 5:36
mvePete O'Hanlon9-Aug-12 5:36 
Questionimage recognition through google image search Pin
Mohsin Mushtaq8-Aug-12 4:03
Mohsin Mushtaq8-Aug-12 4:03 
AnswerRe: image recognition through google image search Pin
Shameel8-Aug-12 4:19
professionalShameel8-Aug-12 4:19 
GeneralRe: image recognition through google image search Pin
Mohsin Mushtaq8-Aug-12 4:30
Mohsin Mushtaq8-Aug-12 4:30 
GeneralRe: image recognition through google image search Pin
lewax008-Aug-12 5:11
lewax008-Aug-12 5:11 
GeneralRe: image recognition through google image search Pin
Mohsin Mushtaq9-Aug-12 9:15
Mohsin Mushtaq9-Aug-12 9:15 
QuestionHow to enable gestures in windows 8 touch ultrabook Pin
ashishguptajhansi8-Aug-12 2:28
ashishguptajhansi8-Aug-12 2:28 
AnswerRe: How to enable gestures in windows 8 touch ultrabook Pin
Richard MacCutchan8-Aug-12 4:05
mveRichard MacCutchan8-Aug-12 4:05 
AnswerRe: How to enable gestures in windows 8 touch ultrabook Pin
BillWoodruff9-Aug-12 8:09
professionalBillWoodruff9-Aug-12 8:09 
QuestionNeed to improve oops concepts Pin
Alagiri.periyasamy@merrillcorp.com8-Aug-12 1:10
Alagiri.periyasamy@merrillcorp.com8-Aug-12 1:10 
AnswerRe: Need to improve oops concepts Pin
Pete O'Hanlon8-Aug-12 1:22
mvePete O'Hanlon8-Aug-12 1:22 
AnswerRe: Need to improve oops concepts Pin
Alan Balkany8-Aug-12 4:31
Alan Balkany8-Aug-12 4:31 
AnswerRe: Need to improve oops concepts Pin
wizardzz8-Aug-12 5:29
wizardzz8-Aug-12 5:29 
QuestionList all the open ports Pin
sarang_k7-Aug-12 20:41
sarang_k7-Aug-12 20:41 
AnswerRe: List all the open ports Pin
Wayne Gaylard7-Aug-12 20:49
professionalWayne Gaylard7-Aug-12 20:49 
GeneralRe: List all the open ports Pin
Pete O'Hanlon8-Aug-12 1:36
mvePete O'Hanlon8-Aug-12 1:36 
GeneralRe: List all the open ports Pin
Wayne Gaylard8-Aug-12 3:33
professionalWayne Gaylard8-Aug-12 3:33 
AnswerRe: List all the open ports Pin
Ed Hill _5_7-Aug-12 23:17
Ed Hill _5_7-Aug-12 23:17 
GeneralRe: List all the open ports Pin
OriginalGriff8-Aug-12 0:18
mveOriginalGriff8-Aug-12 0:18 
AnswerRe: List all the open ports PinPopular
Pete O'Hanlon8-Aug-12 1:46
mvePete O'Hanlon8-Aug-12 1:46 
AnswerRe: List all the open ports Pin
jschell10-Aug-12 12:31
jschell10-Aug-12 12:31 
Generala better way to make, and populate, a List<Type> ? Pin
BillWoodruff7-Aug-12 16:34
professionalBillWoodruff7-Aug-12 16:34 
Current working code in a public static class: a List<Type> used internally:
// required directives [1]:
using System;
using System.Windows.Forms;
using System.Collections.Generic;
//
//
private static List<Type> OkToModify = new List<Type> 
{ 
    typeof(CheckBox),
    typeof(TextBox),
    typeof(Button), 
    typeof(Panel),
    typeof(Label)
};
By "working:" I mean that I can use the List<Type> to test if a given Control passed into the public static class is okay for the uses I make of it. Through, simply:
if (OkToModify.Contains(cntrl.GetType())) { processControl(cntrl) };
I keep thinking that somewhere in my reading (Skeet ? StackOverFlow ?), or here on CP, I have seen a "niftier" way to do this.

Appreciate any alternatives.

thanks, Bill

[1] edit: 'references changed to 'directives in response to feedback from PIEBALDconsult. However, they are, indeed, "required."
"Everything we call real is made of things that cannot be regarded as real." Niels Bohr


modified 7-Aug-12 23:56pm.

GeneralRe: a better way to make, and populate, a List<Type> ? Pin
PIEBALDconsult7-Aug-12 16:54
mvePIEBALDconsult7-Aug-12 16:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.