Click here to Skip to main content
15,907,231 members
Home / Discussions / C#
   

C#

 
GeneralRe: i need an editor control for windows application(C#), do u have? or any idea... Pin
Adam R Harris14-Jul-09 10:24
Adam R Harris14-Jul-09 10:24 
GeneralRe: i need an editor control for windows application(C#), do u have? or any idea... Pin
mr.mohsen14-Jul-09 10:36
mr.mohsen14-Jul-09 10:36 
QuestionI have a question Pin
Rajdeep.NET14-Jul-09 8:38
Rajdeep.NET14-Jul-09 8:38 
AnswerRe: I have a question PinPopular
WebMaster14-Jul-09 8:49
WebMaster14-Jul-09 8:49 
GeneralRe: I have a question Pin
Rajdeep.NET14-Jul-09 9:32
Rajdeep.NET14-Jul-09 9:32 
AnswerRe: I have a question Pin
Not Active14-Jul-09 11:05
mentorNot Active14-Jul-09 11:05 
GeneralRe: I have a question Pin
0x3c014-Jul-09 20:32
0x3c014-Jul-09 20:32 
QuestionDo special processing for a type in a generic class Pin
Dan Neely14-Jul-09 8:15
Dan Neely14-Jul-09 8:15 
I'm trying to roll up some old (originally .net 1.1) abstract classes into generics. The classes in question all provide similar functionality for a data object of a specific type. For the most part things are going well, but I've ran into a few places where one one of the data objects is of a type that needs extra processing in one method beyond what all the other types need. I can check the type of T to see if it's the type I need to do the special processing for, but the cast from T to SpecialType won't compile. Is there a different way I can do this, or is what I want to do impossible?



class MyGenericClass<T> : ICloneable where T: class, new()
{

private T  m_storedClass;
...

private DoStuff()
{
   //do stuff for all types

   //objects of SpecialType need extra stuff done.
   if (typeof(T) == typeof(SpecialType))
   {
      //compiler error:  Error Cannot convert type 'T' to 'SpecialType'
      ((SpecialType)m_storedClass).SpecialString = "foo";
   }
}


The European Way of War: Blow your own continent up.
The American Way of War: Go over and help them.

QuestionHow can i save an Image in a database in a C# application Pin
CoderForEver14-Jul-09 8:15
CoderForEver14-Jul-09 8:15 
AnswerRe: How can i save an Image in a database in a C# application Pin
Henry Minute14-Jul-09 8:38
Henry Minute14-Jul-09 8:38 
QuestionReading multiple items from a single line of data Pin
ReynaW122314-Jul-09 8:12
ReynaW122314-Jul-09 8:12 
AnswerRe: Reading multiple items from a single line of data Pin
Henry Minute14-Jul-09 8:51
Henry Minute14-Jul-09 8:51 
GeneralRe: Reading multiple items from a single line of data Pin
ReynaW122314-Jul-09 9:41
ReynaW122314-Jul-09 9:41 
QuestionHelp - FormClosing event and FormClosed event fires to often Pin
fracalifa14-Jul-09 7:58
fracalifa14-Jul-09 7:58 
QuestionMouseUp Event Not Firing After DoDragDrop Pin
Kevin Marois14-Jul-09 7:19
professionalKevin Marois14-Jul-09 7:19 
AnswerRe: MouseUp Event Not Firing After DoDragDrop Pin
Henry Minute14-Jul-09 7:48
Henry Minute14-Jul-09 7:48 
AnswerRe: MouseUp Event Not Firing After DoDragDrop Pin
Kevin Marois14-Jul-09 7:54
professionalKevin Marois14-Jul-09 7:54 
GeneralRe: MouseUp Event Not Firing After DoDragDrop Pin
Henry Minute14-Jul-09 9:03
Henry Minute14-Jul-09 9:03 
GeneralRe: MouseUp Event Not Firing After DoDragDrop Pin
Kevin Marois14-Jul-09 9:10
professionalKevin Marois14-Jul-09 9:10 
GeneralRe: MouseUp Event Not Firing After DoDragDrop Pin
Henry Minute14-Jul-09 10:10
Henry Minute14-Jul-09 10:10 
GeneralRe: MouseUp Event Not Firing After DoDragDrop [modified] Pin
Kevin Marois14-Jul-09 10:46
professionalKevin Marois14-Jul-09 10:46 
GeneralRe: MouseUp Event Not Firing After DoDragDrop Pin
Henry Minute14-Jul-09 12:06
Henry Minute14-Jul-09 12:06 
GeneralRe: MouseUp Event Not Firing After DoDragDrop Pin
Kevin Marois14-Jul-09 12:38
professionalKevin Marois14-Jul-09 12:38 
QuestionSetting an origin for BinaryReader Pin
SimpleData14-Jul-09 7:16
SimpleData14-Jul-09 7:16 
QuestionC# struct and NuSOAP(php) Pin
OptiPlex14-Jul-09 6:58
OptiPlex14-Jul-09 6:58 

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.