All Questions
3 questions
8
votes
3
answers
7k
views
Is it good practice to make everything internal in C#?
In our solution we have a couple of projects, a project for data layer, service layer, business layer. etc.
Inside the business layer, we use models to transfer data from classes to classes. Is it ...
2
votes
5
answers
1k
views
What should a constructor contain?
What should a constructor contain?
In both cases, all three arguments are needed for the class to work.
Which approach is better and why?
1)
class Language {
LanguageRepository ...
9
votes
7
answers
8k
views
Checking if a method returns false: assign result to temporary variable, or put method invocation directly in conditional?
Is it a good practice to call a method that returns true or false values in an if statement?
Something like this:
private void VerifyAccount()
{
if (!ValidateCredentials(txtUser.Text, txtPassword....