Click here to Skip to main content
15,914,795 members
Home / Discussions / C#
   

C#

 
GeneralRe: use only 2 digis in simple precision Pin
Dan Mos14-Feb-10 7:05
Dan Mos14-Feb-10 7:05 
QuestionC# application and Facebook integration Pin
Etienne_12314-Feb-10 5:15
Etienne_12314-Feb-10 5:15 
AnswerRe: C# application and Facebook integration Pin
Abhinav S14-Feb-10 5:19
Abhinav S14-Feb-10 5:19 
QuestionMessage Removed Pin
14-Feb-10 4:49
hassan iravani14-Feb-10 4:49 
AnswerRe: Distinct Pin
Keith Barrow14-Feb-10 4:57
professionalKeith Barrow14-Feb-10 4:57 
AnswerRe: Distinct Pin
OriginalGriff14-Feb-10 4:58
mveOriginalGriff14-Feb-10 4:58 
QuestionHow do I unit test this? Pin
Member 448708314-Feb-10 4:36
Member 448708314-Feb-10 4:36 
AnswerRe: How do I unit test this? Pin
Keith Barrow14-Feb-10 4:55
professionalKeith Barrow14-Feb-10 4:55 
Member 4487083 wrote:
One way is to make them protected instead of private, but then you are changing the application code.

This is bad, you shouldn't change your code specifically for testing. When writing test code, you might discover shortfalls in the code, and of course the code should be changed in that case, but not just because you need to test.

Member 4487083 wrote:
Is there a way to do it without modifying the code above?


You can call by reflection. (see last point)

Member 4487083 wrote:
Visual Studio can also setup private accessors, but I think they're quite ugly. Or are they they best option?

I don't know if they are the best, that's a matter of opinion I suppose. They are a big improvement on doing it refelctively.


Hope this helps!
Antoine de Saint-Exupery: Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.

AnswerRe: How do I unit test this? Pin
Luc Pattyn14-Feb-10 5:03
sitebuilderLuc Pattyn14-Feb-10 5:03 
GeneralRe: How do I unit test this? [modified] Pin
Keith Barrow14-Feb-10 5:54
professionalKeith Barrow14-Feb-10 5:54 
AnswerRe: How do I unit test this? Pin
Not Active14-Feb-10 4:57
mentorNot Active14-Feb-10 4:57 
AnswerRe: How do I unit test this? Pin
Luc Pattyn14-Feb-10 5:00
sitebuilderLuc Pattyn14-Feb-10 5:00 
GeneralRe: How do I unit test this? Pin
Member 448708315-Feb-10 6:50
Member 448708315-Feb-10 6:50 
GeneralRe: How do I unit test this? Pin
Luc Pattyn15-Feb-10 11:44
sitebuilderLuc Pattyn15-Feb-10 11:44 
AnswerRe: How do I unit test this? [modified] Pin
Jimmanuel14-Feb-10 11:34
Jimmanuel14-Feb-10 11:34 
GeneralRe: How do I unit test this? Pin
Member 448708315-Feb-10 6:48
Member 448708315-Feb-10 6:48 
GeneralRe: How do I unit test this? Pin
Jimmanuel15-Feb-10 8:46
Jimmanuel15-Feb-10 8:46 
QuestionCrash inside InitializeComponent() Pin
SimpleData14-Feb-10 0:24
SimpleData14-Feb-10 0:24 
AnswerRe: Crash inside InitializeComponent() Pin
Abhinav S14-Feb-10 0:30
Abhinav S14-Feb-10 0:30 
GeneralRe: Crash inside InitializeComponent() Pin
SimpleData14-Feb-10 0:34
SimpleData14-Feb-10 0:34 
GeneralRe: Crash inside InitializeComponent() Pin
Abhinav S14-Feb-10 0:47
Abhinav S14-Feb-10 0:47 
GeneralRe: Crash inside InitializeComponent() Pin
SimpleData14-Feb-10 1:42
SimpleData14-Feb-10 1:42 
AnswerRe: Crash inside InitializeComponent() Pin
Luc Pattyn14-Feb-10 0:52
sitebuilderLuc Pattyn14-Feb-10 0:52 
GeneralRe: Crash inside InitializeComponent() Pin
SimpleData14-Feb-10 1:42
SimpleData14-Feb-10 1:42 
QuestionMy .net application stops suddenly , want to know why ? Pin
Dr.DigiTaL13-Feb-10 21:51
Dr.DigiTaL13-Feb-10 21:51 

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.