Click here to Skip to main content
15,910,603 members
Home / Discussions / C#
   

C#

 
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 
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 
Just for example (before I get back to work),

Here's a declaration from current work which is not really difficult to grasp. It's declaring an outer generic container of 2 levels of inner generic containers. What are the ramifications of this? Not much, really. It just allows me to do a lot of work without casting -- which in fact is very important to high speed iterative processes which have to act very often on each internal instance.

protected List<List<List<Bitmap>>> v_Maps_MASTER = new List<List<List<Bitmap>>>( );


This is just a container for further generics which are declared like this:

protected List<Bitmap> v_Maps_Button_UP = new List<Bitmap>( );


In the end however, every member is just a bitmap, and therefore every instance can be called just as "if" it is a bitmap, because *it IS* a bitmap ("generic" or not):

if ( ( enumContours.TopAndBottom == f_Contours ) || ( enumContours.TopOnly == f_Contours ) )
     {
     v_Maps_UP[ i_Btn_BL_BR ][ i_NF ].SetPixel( 0, 0,
          Color_IncOrDecLum( v_cBaseUP_Glossed, lumDiffAccumulated_I + f_LumDif_EdgeBevels ) );
     }
else
     {
     v_Maps_UP[ i_Btn_BL_BR ][ i_NF ].SetPixel( 0, 0,
          Color_IncOrDecLum( v_cFLATFILL_UPContours, lumDiffAccumulated_I + f_LumDif_EdgeBevels ) );
     }


So this is just basic practice. Generics just help us process *a class* (or classes, as they are usually processed).
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 
GeneralRe: C# Question with Generics Pin
malharone22-Feb-07 7:49
malharone22-Feb-07 7:49 
GeneralRe: C# Question with Generics Pin
malharone27-Feb-07 11:13
malharone27-Feb-07 11:13 
QuestionStart reading at the end of a file? Pin
TheJudeDude21-Feb-07 14:05
TheJudeDude21-Feb-07 14:05 
AnswerRe: Start reading at the end of a file? Pin
Shajeel21-Feb-07 18:54
Shajeel21-Feb-07 18:54 
GeneralRe: Start reading at the end of a file? Pin
TheJudeDude22-Feb-07 3:31
TheJudeDude22-Feb-07 3:31 
GeneralRe: Start reading at the end of a file? Pin
Luc Pattyn22-Feb-07 8:08
sitebuilderLuc Pattyn22-Feb-07 8:08 
QuestionISerializable.GetObjectData Method Example Pin
Gywox21-Feb-07 11:53
Gywox21-Feb-07 11:53 
AnswerThats a lot of code Pin
Ennis Ray Lynch, Jr.21-Feb-07 12:48
Ennis Ray Lynch, Jr.21-Feb-07 12:48 
GeneralRe: Thats a lot of code Pin
Gywox21-Feb-07 23:23
Gywox21-Feb-07 23:23 
GeneralRe: Thats a lot of code Pin
Ennis Ray Lynch, Jr.22-Feb-07 2:45
Ennis Ray Lynch, Jr.22-Feb-07 2:45 
Questionmodal popup Pin
netJP12L21-Feb-07 10:08
netJP12L21-Feb-07 10:08 
QuestionChanging the Size of a Panel [modified] Pin
aei_totten21-Feb-07 9:23
aei_totten21-Feb-07 9:23 

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.