RickStrahl / Westwind.plUploadHandler

An ASP.NET base HttpHandler library to handle plUpload content on the server.
28 stars 19 forks source link

plUploadBaseHandler ln 124 #4

Closed jesusgarza closed 10 years ago

jesusgarza commented 10 years ago

Is this right? if (chunk => chunks - 1)

I get an lambda expression error. Shouldn't be

if (chunk >= chunks - 1) ?

jonbakerfish commented 10 years ago

@jesusgarza I think you are right.

RickStrahl commented 10 years ago

Huh? That's not a lambda and C# doesn't care about the precedence of the signs. Either way is valid and should compile fine.

Where is is this failing? Compile time? In what version of .NET?

jonbakerfish commented 10 years ago

@RickStrahl I use vs2010 and .NET 4.0

RickStrahl commented 10 years ago

And you get what? Compiler error?

jonbakerfish commented 10 years ago

@RickStrahl plUploadBaseHandler.cs (124,21): error CS1660: Can not convert lambda expression type "bool", because it is not a delegate type plUploadBaseHandler.cs (124,21): error CS0136: can not declare a local variable called "chunk" in this context, because it would be "chunk" has a different meaning, and it has been in the "parent or current 'scope said the other content

RickStrahl commented 10 years ago

Ok... odd could have sworn that this worked just fine, but sure enough it failed for me as well. Fixed and updated in the repository. Thanks...