Note that there are some explanatory texts on larger screens.

plurals
  1. USSimon
    primarykey
    data
    text
    plurals
    1. COI tried that, but I get an exception when running the program "Additional information: 'Setter' object cannot specify value for read-only property 'IsMouseDirectlyOverItem'". The exception makes sense since the property really is read-only. Changing it to read/write doesn't seem logical to me. Is there any other way to notify my viewmodel?
      singulars
    2. CO@ Lloyd In .NET, a struct does not carry the additional runtime and memory overhead compared to a class. For example, consider the definition of a 3D vector in SharpDX. It's declared as a structure containing 3 fields and not as a class. Part of the reason is because you want a list of Vectors to be blittable, but another reason is that allocating huge (say one million items) array of vectors incurs an incredible memory overhead if a vector is declared as a class.
      singulars
    3. COThere's nothing in the C# world which would allow you to constrain an argument further, than just by it's type and inheritance. When you write a method which takes an int, it's also impossible to constrain the method to only accept numbers in the range of [0, 10] (by means of a nice syntax). What you want is to use PostSharp, CodeContracts, or something similar, which throws an exception when certain conditions are not met, for example when the Type object given does not implement a certain interface. You can always write this code yourself and just throw an ArgumentException in this case.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload