Click here to Skip to main content
14,741,658 members
Home » Discussions » C#
   

C#

 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 9:10
MemberAlex Dunlop23-Nov-20 9:10 
GeneralRe: Error in SQL Light Compact 4 Pin
OriginalGriff23-Nov-20 9:19
mveOriginalGriff23-Nov-20 9:19 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop23-Nov-20 9:28
MemberAlex Dunlop23-Nov-20 9:28 
GeneralRe: Error in SQL Light Compact 4 Pin
Richard Deeming23-Nov-20 18:43
mveRichard Deeming23-Nov-20 18:43 
GeneralRe: Error in SQL Light Compact 4 Pin
Alex Dunlop24-Nov-20 7:06
MemberAlex Dunlop24-Nov-20 7:06 
GeneralRe: Error in SQL Light Compact 4 Pin
Dave Kreskowiak24-Nov-20 9:52
mveDave Kreskowiak24-Nov-20 9:52 
AnswerRe: Error in SQL Light Compact 4 Pin
Dave Kreskowiak23-Nov-20 6:58
mveDave Kreskowiak23-Nov-20 6:58 
Questioninteresting issue with SortedSet and ElementAt Pin
BillWoodruff22-Nov-20 19:59
mveBillWoodruff22-Nov-20 19:59 
SortedSet implements:
[System.Serializable]
public class SortedSet<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.ISet<T>, System.Collections.ICollection, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
There are numerous examples of using ElementAt on SortedSets on the web, like this [^], however, I find using it on a SortedSet<KeyValuePair<string, string>>
if (SortedNames != null)
{
    for (int i = 0; i < SortedNames.Count; i++)
    {
        KeyValuePair<string, string> item = SortedNames.ElementAt[i];
        Console.WriteLine(item);
    }
}
creates a compile error: "CS0021 Cannot apply indexing with [] to an expression of type 'method group" ... I can't locate any matching error report for this and SortedSet.

fyi: I am using a custom IComparer<KeyValuePair<string, string>> for sorting, but, that's working as expected.

Hypothesis: something about using KeyValuePair results in this error.

Ideas ?

thanks, Bill
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali


modified 23-Nov-20 1:47am.

AnswerRe: interesting issue with SortedSet and ElementAt Pin
Sandeep Mewara22-Nov-20 21:06
mvaSandeep Mewara22-Nov-20 21:06 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
BillWoodruff22-Nov-20 23:19
mveBillWoodruff22-Nov-20 23:19 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
Sandeep Mewara22-Nov-20 23:38
mvaSandeep Mewara22-Nov-20 23:38 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
BillWoodruff22-Nov-20 23:46
mveBillWoodruff22-Nov-20 23:46 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
Sandeep Mewara22-Nov-20 23:51
mvaSandeep Mewara22-Nov-20 23:51 
AnswerRe: interesting issue with SortedSet and ElementAt Pin
Richard Deeming22-Nov-20 23:15
mveRichard Deeming22-Nov-20 23:15 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
BillWoodruff22-Nov-20 23:40
mveBillWoodruff22-Nov-20 23:40 
GeneralRe: interesting issue with SortedSet and ElementAt Pin
Richard Deeming22-Nov-20 23:58
mveRichard Deeming22-Nov-20 23:58 
Questionneed some guidance and advice to build a questionnaire system similar to Google forms in vb.net or c# and sql server Pin
albasheer210019-Nov-20 19:09
Memberalbasheer210019-Nov-20 19:09 
Rant[REPOST] need some guidance and advice to build a questionnaire system similar to Google forms in vb.net or c# and sql server Pin
Richard Deeming19-Nov-20 22:45
mveRichard Deeming19-Nov-20 22:45 
AnswerRe: need some guidance and advice to build a questionnaire system similar to Google forms in vb.net or c# and sql server Pin
Gerry Schmitz20-Nov-20 7:04
mveGerry Schmitz20-Nov-20 7:04 
QuestionHelp with Docker Pin
pkfox18-Nov-20 21:30
professionalpkfox18-Nov-20 21:30 
AnswerRe: Help with Docker Pin
Gerry Schmitz19-Nov-20 5:26
mveGerry Schmitz19-Nov-20 5:26 
GeneralRe: Help with Docker Pin
pkfox19-Nov-20 5:28
professionalpkfox19-Nov-20 5:28 
GeneralRe: Help with Docker Pin
Pete O'Hanlon19-Nov-20 5:39
mvePete O'Hanlon19-Nov-20 5:39 
GeneralRe: Help with Docker Pin
pkfox19-Nov-20 7:49
professionalpkfox19-Nov-20 7:49 
QuestionHow to save DataGridView content? Pin
Alex Dunlop17-Nov-20 22:35
MemberAlex Dunlop17-Nov-20 22:35 

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.