Click here to Skip to main content
15,908,775 members
Home / Discussions / C#
   

C#

 
GeneralRe: Exceptions Thrown Back to Caller with No Details Pin
User9874317-Dec-17 13:39
professionalUser9874317-Dec-17 13:39 
GeneralRe: Exceptions Thrown Back to Caller with No Details Pin
User9874317-Dec-17 14:38
professionalUser9874317-Dec-17 14:38 
QuestionI have a collum that is called "MountCT" Time type but for some reason when processing , times do not add up . Pin
Member 1256531216-Dec-17 22:32
Member 1256531216-Dec-17 22:32 
AnswerRe: I have a collum that is called "MountCT" Time type but for some reason when processing , times do not add up . Pin
Richard Andrew x6417-Dec-17 4:54
professionalRichard Andrew x6417-Dec-17 4:54 
Questioncompile error: The name 'HttpUtility' does not exist in the current context Pin
Member 1356965016-Dec-17 9:46
Member 1356965016-Dec-17 9:46 
AnswerRe: compile error: The name 'HttpUtility' does not exist in the current context Pin
Richard MacCutchan16-Dec-17 9:53
mveRichard MacCutchan16-Dec-17 9:53 
AnswerRe: compile error: The name 'HttpUtility' does not exist in the current context Pin
Eddy Vluggen16-Dec-17 10:47
professionalEddy Vluggen16-Dec-17 10:47 
QuestionStill fighting with the terminologies of unicode vs. encoding Pin
JustWatchLittle 16-Dec-17 5:43
professionalJustWatchLittle 16-Dec-17 5:43 
GeneralRe: Still fighting with the terminologies of unicode vs. encoding Pin
PIEBALDconsult16-Dec-17 6:04
mvePIEBALDconsult16-Dec-17 6:04 
GeneralRe: Still fighting with the terminologies of unicode vs. encoding Pin
JustWatchLittle 16-Dec-17 6:07
professionalJustWatchLittle 16-Dec-17 6:07 
SuggestionRe: Still fighting with the terminologies of unicode vs. encoding Pin
Richard Deeming18-Dec-17 2:19
mveRichard Deeming18-Dec-17 2:19 
GeneralRe: Still fighting with the terminologies of unicode vs. encoding Pin
PIEBALDconsult18-Dec-17 12:01
mvePIEBALDconsult18-Dec-17 12:01 
QuestionAdvice on Partial View Pin
sunsher16-Dec-17 0:36
sunsher16-Dec-17 0:36 
AnswerRe: Advice on Partial View Pin
Richard MacCutchan16-Dec-17 0:47
mveRichard MacCutchan16-Dec-17 0:47 
QuestionConvert .NET 4.5 method into .NET 2.0 using LinqBridge Pin
arnold_w14-Dec-17 1:39
arnold_w14-Dec-17 1:39 
AnswerRe: Convert .NET 4.5 method into .NET 2.0 using LinqBridge Pin
Richard Deeming14-Dec-17 2:39
mveRichard Deeming14-Dec-17 2:39 
GeneralRe: Convert .NET 4.5 method into .NET 2.0 using LinqBridge Pin
arnold_w14-Dec-17 3:15
arnold_w14-Dec-17 3:15 
I have re-arranged the code a little to make it easier to spot the compile errors:
30      
31                  List<Record> UnsortedRecords = new List<Record>();
32                  UnsortedRecords.Add(new Record("City",   "Florida",    "Miami"));
33                  // The rest of the adds are removed in order to compact the code
34       
35                  List<Record> SortedRecords = SortRecords(UnsortedRecords);
36              }
37      
38              // You can either replace the ArrayList with a List<T>[^], or use the Cast[^] or OfType[^] 
39              // methods to convert it to an IEnumerable<T>.
40              public static IEnumerable<Record> SortRecords(IEnumerable<Record> source)
41              {
42                  IEnumerable<IEnumerable<Record>> groupT = System.Linq.Enumerable.GroupBy<Record, string, IEnumerable<Record>>
43                      (source,
44                      delegate(Record r) { return r.column1; },
45                      delegate(
46                      string key, IEnumerable<Record> items)
47                      {
48                          IEnumerable<System.Linq.IGrouping<string, Record>> groupH = System.Linq.Enumerable.GroupBy<Record, string>(items, delegate(Record r) { return r.column2; });
49                          return System.Linq.Enumerable.SelectMany<IEnumerable<Record>, 
50                              Record>(groupH, 
51                              delegate(IEnumerable<Record> g) { 
52                                     return g; });
53                      });
54      
55                  return System.Linq.Enumerable.SelectMany<IEnumerable<Record>, Record>(groupT, delegate(IEnumerable<Record> g) { return g; });
56              }
57          }
58      }


I get the following 5 compile errors:

Line 35: Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<sort.form1.record>' to 'System.Collections.Generic.List<sort.form1.record>'. An explicit conversion exists (are you missing a cast?)

Line 43: The best overloaded method match for 'System.Linq.Enumerable.GroupBy<sort.form1.record,string,system.collections.generic.ienumerable<sort.form1.record>>(System.Collections.Generic.IEnumerable<sort.form1.record>, System.Func<sort.form1.record,string>, System.Func<sort.form1.record,system.collections.generic.ienumerable<sort.form1.record>>)' has some invalid arguments

Line 45: Argument '3': cannot convert from 'anonymous method' to 'System.Func<sort.form1.record,system.collections.generic.ienumerable<sort.form1.record>>'

Line 50: The best overloaded method match for 'System.Linq.Enumerable.SelectMany<system.collections.generic.ienumerable<sort.form1.record>,Sort.Form1.Record>(System.Collections.Generic.IEnumerable<system.collections.generic.ienumerable<sort.form1.record>>, System.Func<system.collections.generic.ienumerable<sort.form1.record>,System.Collections.Generic.IEnumerable<sort.form1.record>>)' has some invalid arguments

Line 50: Argument '1': cannot convert from 'System.Collections.Generic.IEnumerable<system.linq.igrouping<string,sort.form1.record>>' to 'System.Collections.Generic.IEnumerable<system.collections.generic.ienumerable<sort.form1.record>>'
GeneralRe: Convert .NET 4.5 method into .NET 2.0 using LinqBridge Pin
Richard Deeming14-Dec-17 3:30
mveRichard Deeming14-Dec-17 3:30 
GeneralRe: Convert .NET 4.5 method into .NET 2.0 using LinqBridge Pin
arnold_w14-Dec-17 4:14
arnold_w14-Dec-17 4:14 
GeneralRe: Convert .NET 4.5 method into .NET 2.0 using LinqBridge Pin
arnold_w14-Dec-17 5:19
arnold_w14-Dec-17 5:19 
SuggestionRe: Convert .NET 4.5 method into .NET 2.0 using LinqBridge Pin
Richard Deeming14-Dec-17 6:17
mveRichard Deeming14-Dec-17 6:17 
GeneralRe: Convert .NET 4.5 method into .NET 2.0 using LinqBridge Pin
BillWoodruff15-Dec-17 11:06
professionalBillWoodruff15-Dec-17 11:06 
GeneralRe: Convert .NET 4.5 method into .NET 2.0 using LinqBridge Pin
arnold_w15-Dec-17 20:29
arnold_w15-Dec-17 20:29 
QuestionNeed to understand work assigned to me Pin
nisss13-Dec-17 20:13
nisss13-Dec-17 20:13 
AnswerRe: Need to understand work assigned to me Pin
OriginalGriff13-Dec-17 20:36
mveOriginalGriff13-Dec-17 20:36 

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.