Click here to Skip to main content
15,909,829 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# SendKeys + - ~ signs? Pin
LLLLGGGG1-Feb-15 6:49
LLLLGGGG1-Feb-15 6:49 
QuestionC# Pin
Member 1116162531-Jan-15 4:23
Member 1116162531-Jan-15 4:23 
AnswerRe: C# Pin
LLLLGGGG31-Jan-15 4:32
LLLLGGGG31-Jan-15 4:32 
GeneralRe: C# Pin
OriginalGriff31-Jan-15 4:48
mveOriginalGriff31-Jan-15 4:48 
GeneralRe: C# Pin
LLLLGGGG31-Jan-15 5:11
LLLLGGGG31-Jan-15 5:11 
AnswerRe: C# Pin
OriginalGriff31-Jan-15 4:47
mveOriginalGriff31-Jan-15 4:47 
QuestionDrawing semi-transparent polygons in C# for CF Pin
Arturo D. Gentili31-Jan-15 1:25
Arturo D. Gentili31-Jan-15 1:25 
AnswerRe: Drawing semi-transparent polygons in C# for CF Pin
Dave Kreskowiak31-Jan-15 4:24
mveDave Kreskowiak31-Jan-15 4:24 
AnswerRe: Drawing semi-transparent polygons in C# for CF Pin
BillWoodruff31-Jan-15 18:05
professionalBillWoodruff31-Jan-15 18:05 
GeneralRe: Drawing semi-transparent polygons in C# for CF Pin
Arturo D. Gentili2-Feb-15 0:01
Arturo D. Gentili2-Feb-15 0:01 
QuestionHow can use these WinApi function in c# Pin
Ahmet Doğan30-Jan-15 23:54
Ahmet Doğan30-Jan-15 23:54 
QuestionTessnet2 in C# reads only one word in the sentence Pin
Praveen Chougale30-Jan-15 23:34
Praveen Chougale30-Jan-15 23:34 
AnswerRe: Tessnet2 in C# reads only one word in the sentence Pin
OriginalGriff31-Jan-15 0:39
mveOriginalGriff31-Jan-15 0:39 
Questionhow i can make code in Page.IsPostBack run on event Pin
Member 1048092030-Jan-15 21:49
Member 1048092030-Jan-15 21:49 
AnswerRe: how i can make code in Page.IsPostBack run on event Pin
OriginalGriff31-Jan-15 0:45
mveOriginalGriff31-Jan-15 0:45 
AnswerRe: how i can make code in Page.IsPostBack run on event Pin
Dave Kreskowiak31-Jan-15 4:08
mveDave Kreskowiak31-Jan-15 4:08 
QuestionHow to enable kiosk mode on windows 7 Pin
vahidbakhtiary30-Jan-15 20:00
vahidbakhtiary30-Jan-15 20:00 
AnswerRe: How to enable kiosk mode on windows 7 Pin
Afzaal Ahmad Zeeshan30-Jan-15 21:22
professionalAfzaal Ahmad Zeeshan30-Jan-15 21:22 
GeneralRe: How to enable kiosk mode on windows 7 Pin
vahidbakhtiary31-Jan-15 0:20
vahidbakhtiary31-Jan-15 0:20 
AnswerRe: How to enable kiosk mode on windows 7 Pin
OriginalGriff30-Jan-15 21:35
mveOriginalGriff30-Jan-15 21:35 
QuestionHow can I dynamically name and instantiate List<string> lists? Pin
turbosupramk330-Jan-15 4:56
turbosupramk330-Jan-15 4:56 
AnswerRe: How can I dynamically name and instantiate List<string> lists? Pin
BillWoodruff30-Jan-15 5:05
professionalBillWoodruff30-Jan-15 5:05 
GeneralRe: How can I dynamically name and instantiate List<string> lists? Pin
turbosupramk330-Jan-15 5:11
turbosupramk330-Jan-15 5:11 
GeneralRe: How can I dynamically name and instantiate List<string> lists? Pin
BillWoodruff30-Jan-15 6:12
professionalBillWoodruff30-Jan-15 6:12 
What is stopping you at this point from creating a List<List<string>> with any arbitrary name and using that ?
C#
private List<List<string>> bunchOData = new List<List<string>>();
private const int ChunkSize = 1000;

private void MakeData()
{
    List<string> bigData = new List<string>();
    
    for (int i = 0; i < 23678; i++) bigData.Add("x");
    
    int limit = (bigData.Count / ChunkSize) * ChunkSize;
    int finalChunk = bigData.Count - limit;
    
    for (int i = 0; i < limit; i += ChunkSize)
    {
        bunchOData.Add(bigData.GetRange(i, ChunkSize));
    }
    
    bunchOData.Add(bigData.GetRange(limit, finalGulp));
}
While GetRange makes a shallow copy (references), the fact you are dealing with strings here makes me wonder about memory usage, particularly when you pass the List<string> items in 'bunchOData into separate threads. If you active-directory-whatever objects turned-into-strings are of varying lengths, then I don't think there's much you can do to avoid getting lots of string being created.
«I'm asked why doesn't C# implement feature X all the time. The answer's always the same: because no one ever designed, specified, implemented, tested, documented, shipped that feature. All six of those things are necessary to make a feature happen. They all cost huge amounts of time, effort and money.» Eric Lippert, Microsoft, 2009

GeneralRe: How can I dynamically name and instantiate List<string> lists? Pin
turbosupramk32-Feb-15 3:48
turbosupramk32-Feb-15 3:48 

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.