Click here to Skip to main content
15,891,657 members
Home / Discussions / C#
   

C#

 
QuestionSQL sync with SQLCE Pin
redspiderke12-Dec-09 3:19
redspiderke12-Dec-09 3:19 
QuestionReplace "inner list" of a generic class inheriting from List<T> ? Pin
BillWoodruff12-Dec-09 2:13
professionalBillWoodruff12-Dec-09 2:13 
AnswerRe: Replace "inner list" of a generic class inheriting from List<T> ? [modified] Pin
PIEBALDconsult12-Dec-09 3:45
mvePIEBALDconsult12-Dec-09 3:45 
GeneralRe: Replace "inner list" of a generic class inheriting from List<T> ? Pin
BillWoodruff12-Dec-09 7:07
professionalBillWoodruff12-Dec-09 7:07 
GeneralRe: Replace "inner list" of a generic class inheriting from List<T> ? Pin
PIEBALDconsult12-Dec-09 7:42
mvePIEBALDconsult12-Dec-09 7:42 
GeneralRe: Replace "inner list" of a generic class inheriting from List<T> ? Pin
BillWoodruff12-Dec-09 8:09
professionalBillWoodruff12-Dec-09 8:09 
GeneralRe: Replace "inner list" of a generic class inheriting from List<T> ? Pin
PIEBALDconsult12-Dec-09 9:49
mvePIEBALDconsult12-Dec-09 9:49 
AnswerRe: Replace "inner list" of a generic class inheriting from List<T> ? Pin
DaveyM6912-Dec-09 7:44
professionalDaveyM6912-Dec-09 7:44 
If you add a constructor that takes an IEnumerable and call the base constructor then you can just assign the List as a new instance. It doesn't exactly answer your question but gives you a workaround...
public class AnyDamnList<T> : List<T>
{
    public AnyDamnList()
        : base()
    { }
    public AnyDamnList(int capacity)
        : base(capacity)
    { }
    public AnyDamnList(IEnumerable<T> collection)
        : base(collection)
    { }
}

AnyDamnList<int> anyDamnList = new AnyDamnList<int>((new List<int>() { 1, 2, 3 }));
List<int> list = new List<int>() { 1, 2, 3 };
anyDamnList = new AnyDamnList<int>(list);


Dave

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus)

GeneralRe: Replace "inner list" of a generic class inheriting from List&lt;T&gt; ? Pin
BillWoodruff12-Dec-09 8:30
professionalBillWoodruff12-Dec-09 8:30 
GeneralRe: Replace "inner list" of a generic class inheriting from List&lt;T&gt; ? Pin
PIEBALDconsult12-Dec-09 9:06
mvePIEBALDconsult12-Dec-09 9:06 
GeneralRe: Replace "inner list" of a generic class inheriting from List&lt;T&gt; ? Pin
Gideon Engelberth12-Dec-09 10:56
Gideon Engelberth12-Dec-09 10:56 
GeneralRe: Replace "inner list" of a generic class inheriting from List&lt;T&gt; ? Pin
BillWoodruff13-Dec-09 12:28
professionalBillWoodruff13-Dec-09 12:28 
AnswerRe: Replace "inner list" of a generic class inheriting from List&lt;T&gt; ? Pin
Nicholas Butler12-Dec-09 23:28
sitebuilderNicholas Butler12-Dec-09 23:28 
GeneralRe: Replace "inner list" of a generic class inheriting from List&lt;T&gt; ? Pin
BillWoodruff13-Dec-09 12:21
professionalBillWoodruff13-Dec-09 12:21 
GeneralRe: Replace "inner list" of a generic class inheriting from List&lt;T&gt; ? Pin
Nicholas Butler13-Dec-09 22:45
sitebuilderNicholas Butler13-Dec-09 22:45 
GeneralRe: Replace "inner list" of a generic class inheriting from List&lt;T&gt; ? [modified] Pin
BillWoodruff14-Dec-09 4:50
professionalBillWoodruff14-Dec-09 4:50 
Answera "partial solution" to : re : Replace "inner list" of a generic class inheriting from List&lt;T&gt; ? Pin
BillWoodruff13-Dec-09 12:51
professionalBillWoodruff13-Dec-09 12:51 
QuestionUsing Methods within a Switch Case Pin
DevonDaDude11-Dec-09 22:47
DevonDaDude11-Dec-09 22:47 
AnswerRe: Using Methods within a Switch Case Pin
Abhinav S11-Dec-09 22:56
Abhinav S11-Dec-09 22:56 
GeneralRe: Using Methods within a Switch Case Pin
OriginalGriff11-Dec-09 23:03
mveOriginalGriff11-Dec-09 23:03 
GeneralRe: Using Methods within a Switch Case Pin
Abhinav S11-Dec-09 23:09
Abhinav S11-Dec-09 23:09 
GeneralRe: Using Methods within a Switch Case Pin
Saksida Bojan12-Dec-09 1:49
Saksida Bojan12-Dec-09 1:49 
GeneralRe: Using Methods within a Switch Case Pin
Richard MacCutchan12-Dec-09 3:08
mveRichard MacCutchan12-Dec-09 3:08 
GeneralRe: Using Methods within a Switch Case Pin
DevonDaDude15-Dec-09 18:20
DevonDaDude15-Dec-09 18:20 
AnswerRe: Using Methods within a Switch Case Pin
OriginalGriff11-Dec-09 23:01
mveOriginalGriff11-Dec-09 23:01 

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.