Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: How can I dynamically name and instantiate List<string> lists? Pin
OriginalGriff30-Jan-15 5:36
mveOriginalGriff30-Jan-15 5:36 
GeneralRe: How can I dynamically name and instantiate List<string> lists? Pin
turbosupramk32-Feb-15 3:51
turbosupramk32-Feb-15 3:51 
GeneralRe: How can I dynamically name and instantiate List<string> lists? Pin
OriginalGriff2-Feb-15 5:07
mveOriginalGriff2-Feb-15 5:07 
QuestionImprove OCR program Pin
rosy8430-Jan-15 4:55
rosy8430-Jan-15 4:55 
AnswerRe: Improve OCR program Pin
Eddy Vluggen30-Jan-15 5:16
professionalEddy Vluggen30-Jan-15 5:16 
AnswerRe: Improve OCR program Pin
rosy8430-Jan-15 5:36
rosy8430-Jan-15 5:36 
GeneralRe: Improve OCR program Pin
Eddy Vluggen30-Jan-15 7:19
professionalEddy Vluggen30-Jan-15 7:19 
GeneralRe: Improve OCR program Pin
rosy8430-Jan-15 12:26
rosy8430-Jan-15 12:26 
AnswerRe: Improve OCR program Pin
rosy847-Feb-15 22:38
rosy847-Feb-15 22:38 
QuestionHow to share a DLL between two applications? Pin
JBHowl30-Jan-15 4:54
JBHowl30-Jan-15 4:54 
QuestionRe: How to share a DLL between two applications? Pin
Eddy Vluggen30-Jan-15 5:13
professionalEddy Vluggen30-Jan-15 5:13 
AnswerRe: How to share a DLL between two applications? Pin
JBHowl30-Jan-15 5:15
JBHowl30-Jan-15 5:15 
GeneralRe: How to share a DLL between two applications? Pin
Eddy Vluggen30-Jan-15 5:38
professionalEddy Vluggen30-Jan-15 5:38 
AnswerRe: How to share a DLL between two applications? Pin
manchanx30-Jan-15 5:13
professionalmanchanx30-Jan-15 5:13 
GeneralRe: How to share a DLL between two applications? Pin
JBHowl30-Jan-15 5:15
JBHowl30-Jan-15 5:15 
GeneralRe: How to share a DLL between two applications? Pin
manchanx30-Jan-15 5:44
professionalmanchanx30-Jan-15 5:44 

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.