Click here to Skip to main content
15,911,315 members
Home / Discussions / C#
   

C#

 
GeneralRe: convert raw image to bmp or jpeg Pin
Christian Graus22-Feb-07 8:54
protectorChristian Graus22-Feb-07 8:54 
Questioncalling a random number only once Pin
alostdruid21-Feb-07 17:13
alostdruid21-Feb-07 17:13 
AnswerRe: calling a random number only once Pin
Shajeel21-Feb-07 18:00
Shajeel21-Feb-07 18:00 
AnswerRe: calling a random number only once Pin
Christian Graus21-Feb-07 18:26
protectorChristian Graus21-Feb-07 18:26 
Questionremoting Pin
kalyan_241621-Feb-07 16:59
kalyan_241621-Feb-07 16:59 
QuestionHow can I know what ChildNode is selected from TreeView? [modified] Pin
Khoramdin21-Feb-07 16:14
Khoramdin21-Feb-07 16:14 
AnswerRe: How can I know what ChildNode is selected from TreeView? Pin
Shajeel21-Feb-07 18:28
Shajeel21-Feb-07 18:28 
QuestionC# Question with Generics [modified] Pin
malharone21-Feb-07 15:04
malharone21-Feb-07 15:04 
AnswerRe: C# Question with Generics Pin
Christian Graus21-Feb-07 15:12
protectorChristian Graus21-Feb-07 15:12 
GeneralRe: C# Question with Generics [modified] Pin
malharone21-Feb-07 15:16
malharone21-Feb-07 15:16 
GeneralRe: C# Question with Generics Pin
Christian Graus21-Feb-07 16:02
protectorChristian Graus21-Feb-07 16:02 
GeneralRe: C# Question with Generics Pin
mike montagne26-Feb-07 14:53
mike montagne26-Feb-07 14:53 
GeneralRe: C# Question with Generics Pin
malharone27-Feb-07 11:13
malharone27-Feb-07 11:13 
GeneralRe: C# Question with Generics Pin
mike montagne27-Feb-07 13:36
mike montagne27-Feb-07 13:36 
GeneralRe: C# Question with Generics Pin
malharone27-Feb-07 13:48
malharone27-Feb-07 13:48 
What I meant was currently line
#4 is: DomainObject _selectedObject
#6 is: public void AddItem (DomainObject obj)
#9 is: public DomainObject SelectedObject

If DomainObject is converted to a generic class, then I can't really compile the ListViewEx class with the above code lines. I must change the declarations as well to .. :
#4 is: DomainObject<??> _selectedObject
#6 is: public void AddItem (DomainObject<??> obj)
#9 is: public DomainObject<??> SelectedObject

So the correct question is, what would I substitue "??" with? if you're implying the following, then there may be a possiblity but that'd just create unnecessary classes and cause confusion:
abstract class BaseObj
{
}
abstract class DomainObject <T> : BaseObj
{
}
class Car : DomainObject <Car>
{
}
class Boat : DomainObject <Boat>
{
}
class ListViewEx
{
   void AddItem (BaseObj obj)
   {
   }
}


The "BaseObj" is simply an empty class and it just changes the object model where consumers can begin using 'baseobj' instead of DomainObject -- since classes such as "ListViewEx" have been changed to accept BaseObj.

- Malhar
GeneralRe: C# Question with Generics Pin
mike montagne27-Feb-07 13:47
mike montagne27-Feb-07 13:47 
GeneralRe: C# Question with Generics Pin
malharone27-Feb-07 14:01
malharone27-Feb-07 14:01 
GeneralRe: C# Question with Generics Pin
mike montagne27-Feb-07 19:24
mike montagne27-Feb-07 19:24 
GeneralRe: C# Question with Generics Pin
mike montagne28-Feb-07 6:25
mike montagne28-Feb-07 6:25 
GeneralRe: C# Question with Generics Pin
mike montagne28-Feb-07 7:06
mike montagne28-Feb-07 7:06 
GeneralRe: C# Question with Generics Pin
mike montagne28-Feb-07 7:09
mike montagne28-Feb-07 7:09 
GeneralRe: C# Question with Generics Pin
mike montagne28-Feb-07 8:14
mike montagne28-Feb-07 8:14 
AnswerRe: C# Question with Generics Pin
Colin Angus Mackay21-Feb-07 22:09
Colin Angus Mackay21-Feb-07 22:09 
GeneralRe: C# Question with Generics Pin
malharone22-Feb-07 7:03
malharone22-Feb-07 7:03 
AnswerRe: C# Question with Generics Pin
darkelv22-Feb-07 0:42
darkelv22-Feb-07 0:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.