Click here to Skip to main content
15,898,946 members
Home / Discussions / C#
   

C#

 
GeneralCalling C# function within javascript Pin
gekoscan3-Apr-03 8:26
gekoscan3-Apr-03 8:26 
GeneralRe: Calling C# function within javascript Pin
David Stone3-Apr-03 9:33
sitebuilderDavid Stone3-Apr-03 9:33 
GeneralProgramming Crystal Report that as Web Service... Pin
frontad3-Apr-03 8:21
frontad3-Apr-03 8:21 
GeneralMS Officeto XML Pin
theJazzyBrain3-Apr-03 8:04
theJazzyBrain3-Apr-03 8:04 
GeneralRe: MS Officeto XML Pin
Feng Qin4-Apr-03 2:13
Feng Qin4-Apr-03 2:13 
GeneralRe: MS Officeto XML Pin
theJazzyBrain6-Apr-03 21:56
theJazzyBrain6-Apr-03 21:56 
GeneralRe: MS Officeto XML Pin
Feng Qin7-Apr-03 18:11
Feng Qin7-Apr-03 18:11 
QuestionHow do you apply attributes to parameters? Pin
Kevin McFarlane3-Apr-03 6:30
Kevin McFarlane3-Apr-03 6:30 
In commenting on my C# Design By Contract article someone wrote:

Hi,<br />
<br />
Have you tried to implement this using attributes and MessageSinks?  I think something like the following would be a lot easier.  <br />
<br />
class Example<br />
{<br />
    public Example(){}<br />
<br />
    [Precondition(y != 0)]<br />
    public int Divide(int x, int y)<br />
    {<br />
        return x / y;<br />
    }<br />
} 


Any idea how to implement this? can it be done? the idea is that Precondition(y != 0) should translate to Assert(y != 0).

All the custom attribute examples I ever see seem to be to do with annotating classes or methods in some way, e.g., [CodeReview("Eric", "01-12-2000", Comment="Bitchin' Code")]

Kevin
AnswerRe: How do you apply attributes to parameters? Pin
David Stone3-Apr-03 7:20
sitebuilderDavid Stone3-Apr-03 7:20 
GeneralRe: How do you apply attributes to parameters? Pin
Kevin McFarlane3-Apr-03 10:23
Kevin McFarlane3-Apr-03 10:23 
GeneralRe: How do you apply attributes to parameters? Pin
David Stone3-Apr-03 13:40
sitebuilderDavid Stone3-Apr-03 13:40 
GeneralC# / XML attributes and values Pin
econner3-Apr-03 2:44
econner3-Apr-03 2:44 
GeneralRe: C# / XML attributes and values Pin
Oleksandr Kucherenko3-Apr-03 4:28
Oleksandr Kucherenko3-Apr-03 4:28 
GeneralRe: C# / XML attributes and values Pin
econner3-Apr-03 6:54
econner3-Apr-03 6:54 
QuestionCan this be done ? Pin
Steve Murrell3-Apr-03 1:36
Steve Murrell3-Apr-03 1:36 
AnswerRe: Can this be done ? Pin
neroknights3-Apr-03 9:23
neroknights3-Apr-03 9:23 
GeneralRe: Can this be done ? Pin
Steve Murrell3-Apr-03 21:30
Steve Murrell3-Apr-03 21:30 
GeneralRe: Can this be done ? Pin
neroknights4-Apr-03 3:51
neroknights4-Apr-03 3:51 
GeneralRe: Can this be done ? Pin
Steve Murrell4-Apr-03 5:35
Steve Murrell4-Apr-03 5:35 
GeneralFileStream.Seek and Encryption Question Pin
jtmtv182-Apr-03 21:56
jtmtv182-Apr-03 21:56 
QuestionHow to pass a delegate object with parameter as input to a ThreadStart constructor? Pin
Anthony_Yio2-Apr-03 19:52
Anthony_Yio2-Apr-03 19:52 
AnswerRe: How to pass a delegate object with parameter as input to a ThreadStart constructor? Pin
Venkatraman2-Apr-03 20:10
Venkatraman2-Apr-03 20:10 
GeneralRe: How to pass a delegate object with parameter as input to a ThreadStart constructor? Pin
Anthony_Yio2-Apr-03 21:04
Anthony_Yio2-Apr-03 21:04 
GeneralRe: How to pass a delegate object with parameter as input to a ThreadStart constructor? Pin
Venkatraman2-Apr-03 21:26
Venkatraman2-Apr-03 21:26 
GeneralRe: How to pass a delegate object with parameter as input to a ThreadStart constructor? Pin
Anthony_Yio2-Apr-03 21:35
Anthony_Yio2-Apr-03 21:35 

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.