blah blah blah is here! blah blah » Close

1
votes
1 answers

When to use exceptions properly

Are there any clear guidelines of when to use exceptions, and when to simply pass a boolean that signifies if the resulting method suceeded in its operation or not? Some people tend to throw exceptions, and then catch them in the calling ...

1
votes
1 answers

Is it a good practise for all classes amd method parameters to use interfaces?

What benefits do I get if I code all my classes and even their method parameters to interfaces?

1
votes
1 answers

help designing a permissions module

I have an object like this: [code] public class Content { public int Id { get; set; } public string Title { get; set; } public string Text { get; set; } public ContentType Type { get; set; } public lon ...

1
votes
1 answers

How do you check for nulls and equality? var == null or null == var

salman
510

I was taught at my first job that whenever you check for nulls or equality, you should reverse it so it looks like: [code] int x = 10; if(10 == x) { } User user = null; if(null == user) { } [/code] Reason being was that ...

Feedback