Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
AnswerRe: Picturebox confusion Pin
Christian Graus11-May-08 12:29
protectorChristian Graus11-May-08 12:29 
QuestionCopying Formatted Text from DataGrid Pin
User 1278211-May-08 5:47
User 1278211-May-08 5:47 
QuestionUsing Shell32.DLL Interface in C# Pin
c0rvus11-May-08 5:14
c0rvus11-May-08 5:14 
AnswerRe: Using Shell32.DLL Interface in C# Pin
Giorgi Dalakishvili11-May-08 5:52
mentorGiorgi Dalakishvili11-May-08 5:52 
GeneralRe: Using Shell32.DLL Interface in C# Pin
c0rvus11-May-08 9:12
c0rvus11-May-08 9:12 
GeneralRe: Using Shell32.DLL Interface in C# Pin
Giorgi Dalakishvili11-May-08 9:16
mentorGiorgi Dalakishvili11-May-08 9:16 
GeneralRe: Using Shell32.DLL Interface in C# Pin
Luc Pattyn11-Aug-11 10:35
sitebuilderLuc Pattyn11-Aug-11 10:35 
GeneralRe: Using Shell32.DLL Interface in C# Pin
Giorgi Dalakishvili11-Aug-11 10:41
mentorGiorgi Dalakishvili11-Aug-11 10:41 
QuestionMulti-thread form managing [modified] Pin
natsuyaki11-May-08 4:20
natsuyaki11-May-08 4:20 
AnswerRe: Multi-thread form managing Pin
Ennis Ray Lynch, Jr.11-May-08 12:54
Ennis Ray Lynch, Jr.11-May-08 12:54 
GeneralRe: Multi-thread form managing Pin
natsuyaki11-May-08 14:29
natsuyaki11-May-08 14:29 
GeneralRe: Multi-thread form managing Pin
natsuyaki11-May-08 18:50
natsuyaki11-May-08 18:50 
QuestionOpening .xls file in Excel from C# Pin
eyalbi00711-May-08 3:35
eyalbi00711-May-08 3:35 
AnswerRe: Opening .xls file in Excel from C# Pin
Gareth H11-May-08 4:41
Gareth H11-May-08 4:41 
AnswerRe: Opening .xls file in Excel from C# Pin
Ed.Poore11-May-08 9:46
Ed.Poore11-May-08 9:46 
AnswerRe: Opening .xls file in Excel from C# Pin
Jimmanuel11-May-08 15:05
Jimmanuel11-May-08 15:05 
QuestionSystem Error mgs and flickering issue.... Pin
ASysSolvers11-May-08 3:03
ASysSolvers11-May-08 3:03 
Questiongenerics question Pin
George_George10-May-08 22:35
George_George10-May-08 22:35 
AnswerRe: generics question Pin
carbon_golem11-May-08 7:25
carbon_golem11-May-08 7:25 
GeneralRe: generics question Pin
George_George11-May-08 15:18
George_George11-May-08 15:18 
GeneralRe: generics question Pin
S. Senthil Kumar11-May-08 19:31
S. Senthil Kumar11-May-08 19:31 
GeneralRe: generics question Pin
George_George11-May-08 21:45
George_George11-May-08 21:45 
Thanks Senthil,


1.

S. Senthil Kumar wrote:
The statement that you mentioned means that you can't have generic generic type parameters - unlike C++, which allows template template types as template parameters.


The following code, which use generics type as generics type type parameter can compile. Seems violates the above rule. Any comments?

using System;
using System.Collections.Generic;

class Test
{
    static void Main()
    {
        Generic<Generic2<List<int>>> gen = new Generic<Generic2<List<int>>>();
    }

}

class Generic<T>
{
    List<T> list1 = new List<T>();
    List<int> list2 = new List<int>();
    List<Generic2<T>> gen1 = new List<Generic2<T>>();
    List<Generic2<int>> gen2 = new List<Generic2<int>>();
}

class Generic2<U>
{
}


2.

S. Senthil Kumar wrote:
In .NET, the generic type can be part of a different assembly from the code attempting to use it,


What does it mean? Means a genetics type defined in one assembly, but used/referred from another assembly? So, C# can do binary level (IL) reference, but C++ could only do source code level (header file) reference?

3.

"Therefore, the C# compiler forces you to declare constraints" -- we can define a generics type without defining any constraints, right?

In what situations, do we have to define constraints when define a generics type?


regards,
George
GeneralRe: generics question Pin
S. Senthil Kumar11-May-08 22:45
S. Senthil Kumar11-May-08 22:45 
GeneralRe: generics question Pin
George_George11-May-08 23:06
George_George11-May-08 23:06 
GeneralRe: generics question Pin
S. Senthil Kumar11-May-08 23:59
S. Senthil Kumar11-May-08 23:59 

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.