I am not confusing anyone. It depends (forgive me if I am not using proper terminology) of range. Is this closed? Opened? From both or from one side? For example range <-1,1> have 3 integers. Range <-1,1) have 2 ints. (-1,1> have 2 too. But (1,1) have only 0. Your substraction is range (-10000,-10000>. For me in this case you should either take closed from or opened from both range. But question is not clear about that som I can be wrong.
Maybe. But C# generics aren't C++ templates - you can't call two different overloads of a method based on the concretization of a generic type, because the concretization doesn't happen at compile time.
It would look like this:
publicvoid Func<T>(Dictionary<T, int> somename)
But going by the description, there's a good chance you can't do this (or actually you could, but you'd have to manually test the type of T, and that's arguably a worse situation than you're on now).
I'd suggest looking at whatever part(s) of the functions that are truly identical (including types) and factoring that logic out of the two specific implementations, into a (private) sub-function. Or use the generic implementation as suggested by Harold. Either way, be careful to avoid falling back to an object-based (non-generic) implementation, because boxing-unboxing will impact your performance.
Hi, With my Form_Load() I wish to set my 150'th Row as my TopRow, while the DataGridView gets visible. For that when I setup the currentcell Property its working fine. no prolem. But when I try through the FirstDisplayedScrollingRowIndex() property its not working.
What I'm after is an interface where the user clicks a button and the machine sends that command out the serial port. Currently, I'm trying to figure out how to arrange one method in one file to be visible to other methods in other files so that I can call the method from other methods in other files. (e.g., like subroutines in other languages)
C# has some sort of structure and rule system which is preventing me from doing that at this moment.
I'm still experimenting; will try the static word (suggested by another member in another thread earlier) in a few minutes from now.
modified 12-Nov-12 12:23pm.
Last Visit: 31-Dec-99 19:00 Last Update: 26-Feb-17 12:37