Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
GeneralRe: name resolution issue Pin
leppie19-Aug-08 1:32
leppie19-Aug-08 1:32 
GeneralRe: name resolution issue Pin
George_George22-Aug-08 1:15
George_George22-Aug-08 1:15 
Questionsql server 3.5 Pin
lankaudaranga18-Aug-08 20:59
lankaudaranga18-Aug-08 20:59 
AnswerRe: sql server 3.5 Pin
Colin Angus Mackay18-Aug-08 21:10
Colin Angus Mackay18-Aug-08 21:10 
GeneralRe: sql server 3.5 Pin
lankaudaranga18-Aug-08 22:14
lankaudaranga18-Aug-08 22:14 
GeneralRe: sql server 3.5 Pin
AhsanS18-Aug-08 23:29
AhsanS18-Aug-08 23:29 
GeneralRe: sql server 3.5 Pin
lankaudaranga19-Aug-08 0:01
lankaudaranga19-Aug-08 0:01 
GeneralRe: sql server 3.5 Pin
Colin Angus Mackay19-Aug-08 1:23
Colin Angus Mackay19-Aug-08 1:23 
GeneralRe: sql server 3.5 Pin
lankaudaranga19-Aug-08 18:25
lankaudaranga19-Aug-08 18:25 
GeneralRe: sql server 3.5 Pin
Colin Angus Mackay19-Aug-08 21:27
Colin Angus Mackay19-Aug-08 21:27 
QuestionIMAP Pin
kathiresanmoorthy18-Aug-08 20:56
kathiresanmoorthy18-Aug-08 20:56 
Questionclickonce setup - publish Pin
arkiboys18-Aug-08 20:52
arkiboys18-Aug-08 20:52 
AnswerRe: clickonce setup - publish Pin
AhsanS18-Aug-08 20:56
AhsanS18-Aug-08 20:56 
QuestionHelp!!!! Pin
Grim Re@p3r18-Aug-08 20:30
Grim Re@p3r18-Aug-08 20:30 
AnswerRe: Help!!!! Unclear post Pin
Muhammad Gouda18-Aug-08 21:18
Muhammad Gouda18-Aug-08 21:18 
QuestionMDI children instances, how to code Pin
ianhunt0118-Aug-08 20:12
ianhunt0118-Aug-08 20:12 
AnswerRe: MDI children instances, how to code Pin
AhsanS18-Aug-08 20:33
AhsanS18-Aug-08 20:33 
AnswerRe: MDI children instances, how to code Pin
DaveyM6918-Aug-08 22:52
professionalDaveyM6918-Aug-08 22:52 
AnswerRe: MDI children instances, how to code Pin
ianhunt0119-Aug-08 8:56
ianhunt0119-Aug-08 8:56 
GeneralRe: MDI children instances, how to code Pin
DaveyM6919-Aug-08 11:10
professionalDaveyM6919-Aug-08 11:10 
QuestionHow to bind hardcoded DataGridView with DataTable Pin
Piyush Vaishnav18-Aug-08 19:24
Piyush Vaishnav18-Aug-08 19:24 
AnswerRe: How to bind hardcoded DataGridView with DataTable Pin
AhsanS18-Aug-08 19:33
AhsanS18-Aug-08 19:33 
Questionsource code of scannig image from web cam in vb.net or in c# Pin
shp_ptn18-Aug-08 19:02
shp_ptn18-Aug-08 19:02 
AnswerRe: source code of scannig image from web cam in vb.net or in c# Pin
AhsanS18-Aug-08 19:24
AhsanS18-Aug-08 19:24 
QuestionLinq Noob, stuck on type inference... Pin
callingshotgun18-Aug-08 18:54
callingshotgun18-Aug-08 18:54 
I'm trying to wrap my head around using LINQ and lambda expressions in c# 3.0, and as such I threw together a short (presumably) simple exercise- A general function that will take an IEnumerable and return a concatonation of the string representations of each of the elements contained therein.

public String concat(ICollection values )
{
return values.Cast<object>().Aggregate((Object x, Object y) => x.ToString() + y.ToString());
}

However, when I try to run this little gem, I get the following:

"The type arguments for method 'System.Query.Sequence.Aggregate<t>, System.Query.Func<t,t,t>)' cannot be inferred from the usage. Try specifying the type arguments explicitly"

Googling revealed that this error is usually the result of saying (x,y) => ... instead of explicitly typing X and Y the way you would when defining the parameters in a method. Makes sense, except that I'm explicitly saying "(Object x, Object y)". Further, when I change all instances of "Object" to "String" (which I don't want to do for the final version, as I want this to work for any type of object), it works without a hitch. I don't understand why that makes a difference, since I'm calling ToString() on the object to get the string out, and "ToString()" works for any object. Is this a failing of the type inference system? Or am I just completely glossing over something?

Much appreciated.

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.