NotImplemented Attribute C# [closed] - c#

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
A simple question: Why there isn't any NotImplementedAttribute in C#?
You can always throw the exception, but I think it would be nice for this to work as the
ObsoleteAttribute -> you get an warning for using that method.
Ok, you have a method with this attribute, and when you implement it you have to remove the attribute by hand, but I think this is safer than using methods with throw new NotImplementedException() inside...and wait for them to get called.
I remember reading that the Obsolete is hard coded into the compiler, but maybe there is some spare room for this one :)
This is just my opinion, maybe I am wrong. But it's something that I would like to see.
Thanks

Related

What is the usage of Assert.Equals? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am working on Unit Testing for my current project and came across something odd. The .Net UnitTesting library has both Assert.Equals and Assert.AreEqual. The remarks for Assert.Equals say to use Assert.AreEqual to compare two objects, but gives no reason as to why to do so over Assert.Equals. Can somebody explain when you should use Assert.Equals in unit testing, if ever and the difference between Assert.Equals and Assert.AreEqual?
Assert.Equals is just the Equals method inherited from object. It has nothing to do with unit testing, and in fact, has no use.
To be more precise, Assert.Equals is exactly the same as Object.Equals. Object.Equals has a use.
However, if you're using Assert.Equals, then you're probably confusing it with Assert.AreEqual, and you want to stop using it.

What GUI technology to use for C# game application? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I was wondering what is the best way to go on this one. My intention is to better learn C# by making a game and an appropriate GUI.
My game would have been something like ZooTycoon (http://www.gamespot.com/zoo-tycoon/)
but much more simple.
As I really don't intend to learn a new language (like DirectX) only to write GUI for this application I would prefer something simpler but handy. Does that even exist?
I would recommend looking at SlimDX or SharpDX.

When to use ISourceBlock or IObservable [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to return a collection of items with the push-model (as opposed to pull, like IEnumerable). However, I'm not sure if I should use IObservable from reactive extensions or ISourceBlock from TPL Dataflow.
They seem very similar, under what circumstances should one choose one over the other?
Basically, I think the answer comes down to how are you going to use the results. If you want to process them using TPL Dataflow, return ISourceBlock<T>. If you're going to process them using Rx, use IObservable<T>.
If you don't know, I think it's better to return ISourceBlock<T>, because it can be easily converted to IObservable<T>.

How extension properties syntax would be look like [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
If Microsoft would add the feature of "Extension Properties", how the syntax of definition of them would appear? this is an article on MSDN is about extension properties (The feature that has been cut from c# 4.0).
This is pure speculation. As far as I know, even Microsoft doesn't yet know what the syntax would be. They could add a new keyword or something else entirely.
However, looking into this further, this is one possible version of the syntax:
public static TimeSpan Minutes[this int i]
{
get { return new TimeSpan(0, i, 0); }
}

Why is BindingListCollectionView sealed? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have an extension to the ICollectionView interface that allows me to handle multi-selection (IMultiSelectCollectionView). I want to provide an implementation that is compatible with BindingListCollectionView but that class is sealed. Does anyone know why this design decision was made?
Sealing a class usually denotes a safeguard to a derived class that might dramatically change the basic behavior of the original one. Anyway, I don't know what's the real meaning for sealing that class.

Categories

Resources