Click here to Skip to main content
15,913,941 members
Home / Discussions / C#
   

C#

 
Questionstatic methods urgent please Pin
netJP12L11-May-07 5:47
netJP12L11-May-07 5:47 
QuestionValidate an XML File in .NET 2.0 C# Pin
SABhatti11-May-07 5:37
SABhatti11-May-07 5:37 
QuestionEmulate Outlook To Field Pin
Gavin Roberts11-May-07 5:21
Gavin Roberts11-May-07 5:21 
AnswerRe: Emulate Outlook To Field Pin
Gavin Roberts13-May-07 21:59
Gavin Roberts13-May-07 21:59 
QuestionGenerating code from a string using c# Pin
Pete O'Hanlon11-May-07 4:35
mvePete O'Hanlon11-May-07 4:35 
AnswerRe: Generating code from a string using c# Pin
Judah Gabriel Himango11-May-07 5:18
sponsorJudah Gabriel Himango11-May-07 5:18 
GeneralRe: Generating code from a string using c# Pin
Pete O'Hanlon11-May-07 8:29
mvePete O'Hanlon11-May-07 8:29 
GeneralRe: Generating code from a string using c# Pin
Judah Gabriel Himango11-May-07 11:35
sponsorJudah Gabriel Himango11-May-07 11:35 
Yeah, it's a shame attributes can't have non-compile time values. I recently hit this problem[^] with MbUnit test framework for argument validation tests.

I've thought about this problem as well regarding argument validation in your real code (as opposed to just unit testing); seems it's pretty impossible to do currently, outside of boil-the-ocean schemes like aspect-oriented programming's method call interceptions. What we need is language extensions for specifying pre- and post-conditions, ala Eiffel[^]. Spec# does this by adding some new keywords to C#, such as ensures and requires. However, if you can't make the Spec# plunge, you can simply add special comments to your C# code, then run their static analysis tool on your C# code to make sure the contracts are enforced.

I'm looking forward to C# 4. Smile | :) Then we should have some good support[^] for pre- and post- conditions, pure methods, immutable types, non-null types, and invariants, alleviating the need for things like validation in attribute strings. Hopefully they throw in some good multi-threading abstractions too. Smile | :)

I'm wondering if LINQ could do anything in the form of expression trees to help us out here with some kind of Linq To Validation[^].



Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Funny Love
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


AnswerRe: Generating code from a string using c# Pin
Daniel Grunwald13-May-07 2:40
Daniel Grunwald13-May-07 2:40 
GeneralRe: Generating code from a string using c# Pin
Pete O'Hanlon13-May-07 9:06
mvePete O'Hanlon13-May-07 9:06 
Questionurgent help required Pin
IrfanHaleem11-May-07 4:31
IrfanHaleem11-May-07 4:31 
AnswerStop naming all your messages with please/urgent Pin
leckey11-May-07 4:48
leckey11-May-07 4:48 
GeneralRe: Stop naming all your messages with please/urgent Pin
IrfanHaleem11-May-07 20:59
IrfanHaleem11-May-07 20:59 
AnswerRe: urgent help required Pin
Dave Kreskowiak11-May-07 5:22
mveDave Kreskowiak11-May-07 5:22 
GeneralRe: urgent help required Pin
Paul Conrad11-May-07 8:07
professionalPaul Conrad11-May-07 8:07 
GeneralRe: urgent help required Pin
Dave Kreskowiak11-May-07 9:09
mveDave Kreskowiak11-May-07 9:09 
GeneralRe: urgent help required Pin
Paul Conrad11-May-07 9:11
professionalPaul Conrad11-May-07 9:11 
AnswerRe: urgent help required Pin
Leslie Sanford11-May-07 6:38
Leslie Sanford11-May-07 6:38 
Questioninteraction with plugin! Pin
ashu.singh11-May-07 4:15
ashu.singh11-May-07 4:15 
QuestionCan you tell me How to Port C# application to Linux?? Pin
A . Ansari11-May-07 4:08
A . Ansari11-May-07 4:08 
AnswerRe: Can you tell me How to Port C# application to Linux?? Pin
Jimmanuel11-May-07 4:23
Jimmanuel11-May-07 4:23 
GeneralRe: Can you tell me How to Port C# application to Linux?? Pin
A . Ansari12-May-07 18:20
A . Ansari12-May-07 18:20 
GeneralRe: Can you tell me How to Port C# application to Linux?? Pin
Jimmanuel13-May-07 12:41
Jimmanuel13-May-07 12:41 
GeneralRe: Can you tell me How to Port C# application to Linux?? Pin
A . Ansari13-May-07 18:08
A . Ansari13-May-07 18:08 
QuestionVS2005 Regfree usage for COM dll in webservice Pin
MarkusEon11-May-07 2:46
MarkusEon11-May-07 2:46 

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.