Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I know you can easily create a wrapper around BinaryReader and expose Read7BitEncodedInt
But I'm just curious why the creators chose to not make it public
Is there a logic reason for it?
My guess is that this is internal implementation detail and isn't required to effectively use the BinaryReader. I wonder the opposite, why isn't it private? Presumably, there is a subclass out there that needs to use it or overwrite the implementation...
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
C# 8 adds the option for default method implementation in interfaces, meaning a method CAN be defined in the interface.
In a situation when I DON'T need a default constructor, nor inherited fields in the derived classes, what should I default to: An interface with a default implementation, or the old-school way of an abstract class?
Is there a convention for styling for this case?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Does this have any adverse effects on our CRUD operations?
Is there a significant difference if we don't use these attributes in our model?
Yes, there are a significant difference if you dont use the attributes.
See:
https://learn.microsoft.com/es-es/dotnet/framework/wcf/feature-details/using-data-contracts
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
In my smart client solution, I have a Project folder with:
IProjectView.cs
*ProjectView*
ProjectView.cs
ProjectView.Designer.cs
ProjectView.GeneratedCode.cs
ProjectView.resx
ProjectViewPresenter.cs
I want to define some constants for user by ProjectView.cs and ProjectViewPresenter.cs. Both of these classes implement IProjectView.cs, so were I back in Java, I'd put them there. If this were C++, I'd create a class ProjectConstants.cs and have the classes inherit it, but C# doesn't allow multiple inheritance.
How do I do this?
Can having a Read-Only Property in your interface solve your problem?
string MyReadOnlyProperty { get; }
I have no clue if this is very performance-wise compared to constant thought.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Is there any good example of the transmission bool parameter with attribute routing?
For example I can transform route
{controller}/{action}?param=true
to
{controller}/{action}/param=true
but it still "dirty".
Sorry for dummy question (:
Solution is use two attribute like this:
[Route("ValuesForFalse/{param=false}")]
[Route("ValuesForTrue/{param=true}")]
you can use like this
{controller}/{action}/{param}
param is bool
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm using XmlManager to
do xml manipulations in several methods in a class.where I should declare XmlManager variable ?
1.locally within each method and do intialization.
2 declare at globally and initiate at the method level
As it is, in this question, there's absolutely NO difference whatsoever because there's neither performance gain nor significant design issues.
Maybe if the question is put into context there could be reason to choose one approach over the other, but as it stands now. None of the approach is better than the other one