Click here to Skip to main content
15,890,345 members
Home / Discussions / C#
   

C#

 
AnswerRe: knap sack Pin
Pete O'Hanlon20-Apr-14 9:50
mvePete O'Hanlon20-Apr-14 9:50 
GeneralRe: knap sack Pin
Manfred Rudolf Bihy20-Apr-14 10:22
professionalManfred Rudolf Bihy20-Apr-14 10:22 
GeneralRe: knap sack Pin
Wes Aday20-Apr-14 10:31
professionalWes Aday20-Apr-14 10:31 
AnswerRe: knap sack Pin
OriginalGriff20-Apr-14 20:48
mveOriginalGriff20-Apr-14 20:48 
GeneralRe: knap sack Pin
harold aptroot21-Apr-14 7:17
harold aptroot21-Apr-14 7:17 
QuestionRe: knap sack Pin
ZurdoDev21-Apr-14 9:38
professionalZurdoDev21-Apr-14 9:38 
QuestionDAL Responses Design Question Pin
Kevin Marois20-Apr-14 7:52
professionalKevin Marois20-Apr-14 7:52 
AnswerRe: DAL Responses Design Question Pin
Ravi Bhavnani20-Apr-14 15:04
professionalRavi Bhavnani20-Apr-14 15:04 
IMHO, there are several issues with this design.

  1. AddLookup() should execute within a transaction, since a LookupEntity could be inserted between the check and your insert.

  2. The case-insensitive string compare is flawed on several fronts: (1) A .ToLower() compare will not work across all cultures.  Instead use .ToUpperInvariant(). (2) Performing a case conversion is a performance bottleneck, since your code won't scale.  Try running the compare on a million records containing large strings.  Instead, perform a case-insensitive using string.Equals() with StringComparison.OrdinalIgnoreCase.

  3. The value of _ResponseBase.Message depends on the order in which the instance's properties are set.  This is a VBT.  _ResponseBase should instead offer various constructors that set its different properties, all of which should have protected setters and public getters.

  4. Exceptions should be thrown, not returned.  The only exception (pun intended) to this rule is when the thrown exception cannot be relayed across the network (e.g. ASP .NET MVC server exception to JS client layer).


/ravi
My new year resolution: 2048 x 1536
Home | Articles | My .NET bits | Freeware
ravib(at)ravib(dot)com

GeneralRe: DAL Responses Design Question Pin
Kevin Marois21-Apr-14 6:35
professionalKevin Marois21-Apr-14 6:35 
GeneralRe: DAL Responses Design Question Pin
Ravi Bhavnani21-Apr-14 7:41
professionalRavi Bhavnani21-Apr-14 7:41 
GeneralRe: DAL Responses Design Question Pin
Kevin Marois21-Apr-14 8:10
professionalKevin Marois21-Apr-14 8:10 
QuestionHow to develop on Windows 7 64 bit and output x32 exe that uses x32 usb driver ? Pin
Mario 5620-Apr-14 2:46
Mario 5620-Apr-14 2:46 
AnswerRe: How to develop on Windows 7 64 bit and output x32 exe that uses x32 usb driver ? Pin
OriginalGriff20-Apr-14 3:43
mveOriginalGriff20-Apr-14 3:43 
GeneralRe: How to develop on Windows 7 64 bit and output x32 exe that uses x32 usb driver ? Pin
Mario 5620-Apr-14 6:32
Mario 5620-Apr-14 6:32 
Questionhow to code to c# method call on html anchor tag but that anchor tag is placed in datalist. Pin
Ayang1719-Apr-14 9:14
Ayang1719-Apr-14 9:14 
AnswerRe: how to code to c# method call on html anchor tag but that anchor tag is placed in datalist. Pin
Wes Aday19-Apr-14 10:35
professionalWes Aday19-Apr-14 10:35 
QuestionDoubleClick Selected Row Datagrid (C# WPF Project) Pin
rattlerrFx19-Apr-14 8:27
rattlerrFx19-Apr-14 8:27 
AnswerRe: DoubleClick Selected Row Datagrid (C# WPF Project) Pin
Wes Aday19-Apr-14 10:34
professionalWes Aday19-Apr-14 10:34 
GeneralRe: DoubleClick Selected Row Datagrid (C# WPF Project) Pin
rattlerrFx19-Apr-14 12:10
rattlerrFx19-Apr-14 12:10 
GeneralRe: DoubleClick Selected Row Datagrid (C# WPF Project) Pin
Wes Aday20-Apr-14 2:22
professionalWes Aday20-Apr-14 2:22 
GeneralRe: DoubleClick Selected Row Datagrid (C# WPF Project) Pin
rattlerrFx20-Apr-14 4:24
rattlerrFx20-Apr-14 4:24 
GeneralRe: DoubleClick Selected Row Datagrid (C# WPF Project) Pin
Wes Aday20-Apr-14 4:29
professionalWes Aday20-Apr-14 4:29 
SuggestionRe: DoubleClick Selected Row Datagrid (C# WPF Project) Pin
Richard MacCutchan19-Apr-14 21:20
mveRichard MacCutchan19-Apr-14 21:20 
QuestionDisplaying UTM coordinates on a form Pin
Member 1068390219-Apr-14 8:07
Member 1068390219-Apr-14 8:07 
QuestionDraw a Line within a class and inheritance Pin
Member 1075956718-Apr-14 16:55
Member 1075956718-Apr-14 16:55 

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.