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...
Not sure I follow 100% but it seems to me that you want your function to accept a parameter with a specific signature hence an Interface. If you're worker...
Thanks for the response. My Worker (WorkerInfo) object is one of many different entity types in my solution. Another one is a Customer (CustomerInfo) object. ...
Yeah, I don't see a way around the switch, but it's a very common thing from samples that I've seen. But regardless what ever helps centralize and minimize the...
StrongCoders.com is proud to announce the launch of its community site featuring brand new specialized forums in addition to its already-popular blogs. Ask and...
The StrongCoders.com Community now has a forum that parallels this group for those of you who prefer forums. The StrongTypes forum allows for subscription by...
hi all, I was working on function that counts the word frequency of file, what i want to do is find the word that occurs the most, so I am not familiar with...