Click here to Skip to main content
16,016,290 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can we access to an object of a form from another form? Pin
PIEBALDconsult22-Feb-12 10:09
mvePIEBALDconsult22-Feb-12 10:09 
GeneralRe: How can we access to an object of a form from another form? Pin
Fred 3422-Feb-12 11:53
Fred 3422-Feb-12 11:53 
AnswerRe: How can we access to an object of a form from another form? Pin
Wes Aday22-Feb-12 10:32
professionalWes Aday22-Feb-12 10:32 
GeneralRe: How can we access to an object of a form from another form? Pin
Fred 3422-Feb-12 11:51
Fred 3422-Feb-12 11:51 
AnswerRe: How can we access to an object of a form from another form? Pin
Luc Pattyn22-Feb-12 12:12
sitebuilderLuc Pattyn22-Feb-12 12:12 
AnswerRe: How can we access to an object of a form from another form? Pin
hellono122-Feb-12 20:50
hellono122-Feb-12 20:50 
AnswerRe: How can we access to an object of a form from another form? Pin
Quintain26-Feb-12 15:03
Quintain26-Feb-12 15:03 
QuestionRegarding AttributeUsageAttribute.AllowMultiple Pin
PIEBALDconsult22-Feb-12 8:11
mvePIEBALDconsult22-Feb-12 8:11 
I'm working on a custom Attribute. What I'd like is to have it take a parameter (e.g. [MyAttribute(foo)]), but the type I want to use isn't allowed (non-constant).

So, I made my Attribute abstract and derived other Attributes to specify the desired values:

class FooAttribute : MyAttribute
{
  public FooAttribute() : base ( foo ) {}
}

class BarAttribute : MyAttribute
{
  public BarAttribute() : base ( bar ) {}
}


This works as expected except that instances of both derived Attributes can then be applied and they don't get flagged as duplicates (of MyAttribute); from a certain point of view, AllowMultiple=false should disallow multiple instances of the base class. In practice this doesn't happen, and that's understandable, but I want to find a way to get it to work that way.

I investigated the TypeId property thinking that would work, but it doesn't seem to.

Has anyone here happened upon this situation and found a solution?

Currently my code is just using the first instance of MyAttribute it finds, but I'm considering having the code throw an Exception if it finds multiples -- does anyone here have an opinion on which course of action is better?
QuestionHow to check that dsn which is created used for Sql Server or Access using C# Pin
Awadhendra123422-Feb-12 2:16
Awadhendra123422-Feb-12 2:16 
AnswerRe: How to check that dsn which is created used for Sql Server or Access using C# Pin
PIEBALDconsult22-Feb-12 2:56
mvePIEBALDconsult22-Feb-12 2:56 
GeneralRe: How to check that dsn which is created used for Sql Server or Access using C# Pin
Awadhendra123422-Feb-12 3:24
Awadhendra123422-Feb-12 3:24 
GeneralRe: How to check that dsn which is created used for Sql Server or Access using C# Pin
PIEBALDconsult22-Feb-12 4:00
mvePIEBALDconsult22-Feb-12 4:00 
QuestionDetect Marked Checkbox using OCR Pin
Zeyad Jalil22-Feb-12 2:12
professionalZeyad Jalil22-Feb-12 2:12 
AnswerRe: Detect Marked Checkbox using OCR PinPopular
enhzflep22-Feb-12 4:44
enhzflep22-Feb-12 4:44 
GeneralRe: Detect Marked Checkbox using OCR Pin
Zeyad Jalil22-Feb-12 20:29
professionalZeyad Jalil22-Feb-12 20:29 
GeneralRe: Detect Marked Checkbox using OCR Pin
enhzflep22-Feb-12 20:43
enhzflep22-Feb-12 20:43 
Questionsmtp unknown sender Pin
CS3421-Feb-12 23:23
CS3421-Feb-12 23:23 
AnswerRe: smtp unknown sender Pin
Richard MacCutchan22-Feb-12 3:14
mveRichard MacCutchan22-Feb-12 3:14 
Questionadd application to \\root\SecurityCenter2\antispywareproduct as antispyware Pin
abhinish21-Feb-12 23:12
abhinish21-Feb-12 23:12 
Questionhow can i scann image from scanner in C# Pin
A7mad_21-Feb-12 22:55
A7mad_21-Feb-12 22:55 
AnswerRe: how can i scann image from scanner in C# Pin
lukeer22-Feb-12 2:17
lukeer22-Feb-12 2:17 
Questiontrouble in connecting from C# to Postgre SQL. Pin
hellono121-Feb-12 20:46
hellono121-Feb-12 20:46 
AnswerRe: trouble in connecting from C# to Postgre SQL. Pin
BobJanova21-Feb-12 21:42
BobJanova21-Feb-12 21:42 
QuestionIntegration of .NET with retail billing machine Pin
tahernd21-Feb-12 19:14
tahernd21-Feb-12 19:14 
AnswerRe: Integration of .NET with retail billing machine Pin
Richard MacCutchan21-Feb-12 21:24
mveRichard MacCutchan21-Feb-12 21:24 

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.