Click here to Skip to main content

C#

   
Home > Forums > C#

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
GeneralRe: How can we access to an object of a form from another form? Pinmemberfaraz3411:53 22 Feb '12  
AnswerRe: How can we access to an object of a form from another form? PinassociateWes Aday10:32 22 Feb '12  
GeneralRe: How can we access to an object of a form from another form? Pinmemberfaraz3411:51 22 Feb '12  
AnswerRe: How can we access to an object of a form from another form? PinmvpLuc Pattyn12:12 22 Feb '12  
AnswerRe: How can we access to an object of a form from another form? Pinmemberhellono120:50 22 Feb '12  
AnswerRe: How can we access to an object of a form from another form? PinmemberQuintain15:03 26 Feb '12  
QuestionRegarding AttributeUsageAttribute.AllowMultiple PinmemberPIEBALDconsult8:11 22 Feb '12  
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# PinmemberAwadhendra12342:16 22 Feb '12  
AnswerRe: How to check that dsn which is created used for Sql Server or Access using C# PinmemberPIEBALDconsult2:56 22 Feb '12  
GeneralRe: How to check that dsn which is created used for Sql Server or Access using C# PinmemberAwadhendra12343:24 22 Feb '12  
GeneralRe: How to check that dsn which is created used for Sql Server or Access using C# PinmemberPIEBALDconsult4:00 22 Feb '12  
QuestionDetect Marked Checkbox using OCR Pinmemberzead2:12 22 Feb '12  
AnswerRe: Detect Marked Checkbox using OCR PinPopularmemberenhzflep4:44 22 Feb '12  
GeneralRe: Detect Marked Checkbox using OCR Pinmemberzead20:29 22 Feb '12  
GeneralRe: Detect Marked Checkbox using OCR Pinmemberenhzflep20:43 22 Feb '12  
Questionsmtp unknown sender PinmemberCS3423:23 21 Feb '12  
AnswerRe: smtp unknown sender PinmvpRichard MacCutchan3:14 22 Feb '12  
Questionadd application to \\root\SecurityCenter2\antispywareproduct as antispyware Pinmemberabhinish23:12 21 Feb '12  
Questionhow can i scann image from scanner in C# PinmemberA7mad_22:55 21 Feb '12  
AnswerRe: how can i scann image from scanner in C# Pinmemberlukeer2:17 22 Feb '12  
Questiontrouble in connecting from C# to Postgre SQL. Pinmemberhellono120:46 21 Feb '12  
AnswerRe: trouble in connecting from C# to Postgre SQL. PinmemberBobJanova21:42 21 Feb '12  
QuestionIntegration of .NET with retail billing machine Pinmembertahernd19:14 21 Feb '12  
AnswerRe: Integration of .NET with retail billing machine PinmvpRichard MacCutchan21:24 21 Feb '12  
AnswerRe: Integration of .NET with retail billing machine PinmemberMycroft Holmes21:39 21 Feb '12  

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

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


Advertise | Privacy | Mobile
Beta | 2.5.120517.1 | Last Updated 23 May 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid