Click here to Skip to main content
15,879,326 members
Home / Discussions / C#
   

C#

 
GeneralRe: Retrieve name of Printer using SendMessage Pin
Rage12-Sep-12 21:25
professionalRage12-Sep-12 21:25 
GeneralRe: Retrieve name of Printer using SendMessage Pin
toBeH_S16-Sep-12 15:18
toBeH_S16-Sep-12 15:18 
QuestionRandom Permutation Interface Pin
Skippums11-Sep-12 15:58
Skippums11-Sep-12 15:58 
AnswerRe: Random Permutation Interface Pin
Dave Kreskowiak11-Sep-12 17:44
mveDave Kreskowiak11-Sep-12 17:44 
AnswerRe: Random Permutation Interface Pin
BillWoodruff12-Sep-12 0:05
professionalBillWoodruff12-Sep-12 0:05 
AnswerRe: Random Permutation Interface Pin
Pete O'Hanlon12-Sep-12 0:18
mvePete O'Hanlon12-Sep-12 0:18 
GeneralRe: Random Permutation Interface Pin
Dave Kreskowiak12-Sep-12 2:21
mveDave Kreskowiak12-Sep-12 2:21 
AnswerRe: Random Permutation Interface Pin
BobJanova12-Sep-12 1:17
BobJanova12-Sep-12 1:17 
You can't modify an IEnumerable. You can't modify a Queue or a Stack via array indexing, either. So I don't think it's reasonable to try to do this in place except with an IList.

List<T>, Stack<T> and Queue<T> all have a constructor that takes an argument of type IEnumerable<T>, so you could potentially build a new instance of the same type that you started with.

However, considering you are already making a copy of the complete contents of the collection, and storing them in a temporary array, why not just return a List<T> with those items?
GeneralRe: Random Permutation Interface Pin
Pete O'Hanlon12-Sep-12 1:27
mvePete O'Hanlon12-Sep-12 1:27 
GeneralRe: Random Permutation Interface Pin
Skippums12-Sep-12 6:41
Skippums12-Sep-12 6:41 
AnswerRe: Random Permutation Interface Pin
PIEBALDconsult12-Sep-12 3:07
mvePIEBALDconsult12-Sep-12 3:07 
AnswerRe: Random Permutation Interface Pin
Skippums12-Sep-12 7:32
Skippums12-Sep-12 7:32 
GeneralRe: Random Permutation Interface Pin
BillWoodruff13-Sep-12 2:37
professionalBillWoodruff13-Sep-12 2:37 
GeneralRe: Random Permutation Interface Pin
PIEBALDconsult13-Sep-12 3:23
mvePIEBALDconsult13-Sep-12 3:23 
GeneralRe: Random Permutation Interface Pin
PIEBALDconsult13-Sep-12 3:27
mvePIEBALDconsult13-Sep-12 3:27 
GeneralRe: Random Permutation Interface Pin
Skippums13-Sep-12 7:27
Skippums13-Sep-12 7:27 
Questionconvert xdocument to integer Pin
rachel_m11-Sep-12 12:16
rachel_m11-Sep-12 12:16 
AnswerRe: convert xdocument to integer Pin
Pete O'Hanlon11-Sep-12 12:22
mvePete O'Hanlon11-Sep-12 12:22 
GeneralRe: convert xdocument to integer Pin
rachel_m11-Sep-12 16:04
rachel_m11-Sep-12 16:04 
GeneralRe: convert xdocument to integer Pin
Eddy Vluggen11-Sep-12 20:55
professionalEddy Vluggen11-Sep-12 20:55 
GeneralRe: convert xdocument to integer Pin
rachel_m12-Sep-12 4:44
rachel_m12-Sep-12 4:44 
GeneralRe: convert xdocument to integer Pin
PIEBALDconsult13-Sep-12 3:29
mvePIEBALDconsult13-Sep-12 3:29 
GeneralRe: convert xdocument to integer Pin
Pete O'Hanlon11-Sep-12 22:16
mvePete O'Hanlon11-Sep-12 22:16 
QuestionCOM+ Event System Pin
Member 813710511-Sep-12 11:40
Member 813710511-Sep-12 11:40 
AnswerRe: COM+ Event System Pin
Bernhard Hiller11-Sep-12 20:24
Bernhard Hiller11-Sep-12 20:24 

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.