Data verifications in Getter or elsewhere?
public string Name
{
get
{
return _name;
}
set
{
_name = value;
}
}
Tags: verification getter setter optimization
Source: By TiTi as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0
Related code-snippets:
- What is the easiest way to generate sets and getters in Visual Studio?
- What is the best way to calculate Big O?
- Performance Considerations for throwing Exceptions
- What is the difference between a string length and a empty string?
- How can I overload std::swap()?
- Difference between inline strings & concatenation in PHP?
- How can I optimize search algorithms in C language?
- What are some effective ways to compare float and double comparisons?
- How can I remove items from sequence in Python?
- NET - memory leaks in a datacenter.NET framework?
- How can you concatenate strings?
- Is it better to structure a SQL table to have a match, or return no result?
- What is the difference between i++ and ++i in C?
- What's optimal? UNION vs WHERE IN (str1, str2, str3)?
- What are some types of interfaces?