Refering to this which I found on Microsoft's site: List<T> is basically a better ArrayList. It is optimized for speed, size, and power. Use it for majority of...
Looks like you are using a collection and not an API. I think its fine. ... -- Eric Ramseur Microsoft.NET Consultant ... http://eramseur.blogspot.com |...
Oh, man--i got all caught up in my answer and lost sight of the original question, sorry 'bout that. The design guidelines touch on the answer. From here: ...
I don't see an advantage to using generics in this scenario; (whether its Collection<T> or List<T>). I see a disadvantage since a generic object is used in...
Here's an interesting article that I came across regarding using nullable types with typed DataSets. Apparently, this feature was cut out at the last minute....
Hi Dave, This most likely has to do with the primary key. Make sure that the primary key is included in the DataKeyNames property for the GridView. HTH Thank...
Thanks Ryan, Ok, that wasn't the problem. I had that specified in the GridView already. The problem was my function UpdateAllergy, this is what it should be: ...
I think Generics will solve my need for strong type casting with web services but I am having a problem with the Web Service Code. Any ideas on how to pass an...
Hi, You can't use Generics with web services. Ryan Thank you, Ryan Olshan Website - http://www.StrongTypes.com <http://www.strongtypes.com/> Group -...
I'm trying to loop through a reader and put all the values into a generic list. public T RStoList<T>(SqlDataReader rdr, int index) { List<T> list = new...
Since GetValue returns an object, you'd have to cast it to T. public T RStoList<T>(SqlDataReader rdr, int index) { List<T> list = new List<T>(); while...
Hello everyone, this is my first post so please bare with me. I am trying to understand why I can't cast generic class to a class of a base type. I have the...
What is the exception or compiler error you are getting? Thank you, Ryan Olshan Website - http://www.StrongTypes.com <http://www.strongtypes.com/> Group -...
Talk about simple eh? How you're going to keep all this stuff straight is beyond me. You've got Contact AND Contract all goo'd together and triple inheritance...
Funny thing is that I did exactly what you're talking about. interface ILetter { } class A : ILetter { private string _ID; public string ID { get { return...
I'm not expert, in anybody's book, but I believe you're trying to use an interface like a base class. An interface is really just a signature, a template if...
Hey Dave thanks for your help and insight into casting to an Interface. I understand what you mean, and I follow your example to the T. My only problem is that...
... to turn a person into a painting. Dave, your anology is wrong. It's perfectly valid to cast an object to an interface it supports. Inclusive you don't even...
Santiago, Searching on Groups.google.com Generic types are typesafe to the type they are bound to. From the draft of the ECMA spec: <quote> No special...
Paulo, Ah, well, I stand corrected. Thank you. I realize I was wrong but, is there a valid reason why someone would want to cast down to an interface? ...
... You only seem to have broken the laws of nature ( or more specifically the laws of typing in C#), but in reality you havent'. If you run your code you'll...
Paulo, here's another question to further complicate things: Lets say I want to use a sortedlist as the basis, which does not support to Array? I started...
Just to add to this post Paulo if I may, Dave, what I've mainly seen it used for is for passing of params to a method. If you have a methods that needs to...
I found this very intersting and complicated article about programming with generics. I hope one of you can benefit from it and understand it because my head...
Here's my scenario: 1. I have a DAL 2. In my DAL, I want ONE function that will transform an ADOReader resultset into a strong data entity object that I will...