1d
awarded Yearling
Apr
15
answered Using Linq to get the last N elements of a collection?
Apr
14
comment Type-inferring a constant in C#
That's the link. However I reiterate we are discussing orthognal issues. It's unfortunate that var means assign and nonconst at the same time and that has little to do with RHS expression type inference.
Apr
14
comment Type-inferring a constant in C#
As well from the C# doc with respects to the var keyword. This keyword specifies that the value of the field or the local variable is constant, which means that it can't be modified. Note the inference that a variable can be constant. Thus const var. No shudders!
Apr
14
comment Type-inferring a constant in C#
FSharp has no problem with type inference on let x = 10.0 Type inference on the rhs expression seems an orthogonal concept to the mutability of the reference. var for mutable reference. const for immutable reference. Type inference for both makes sense.
Apr
14
comment C# Tasks get result or catch exception
Actually you are right. Because I can't eliminate the first await on httpClient.GetAsync then I am forced to await the second task.
Apr
14
comment C# Tasks get result or catch exception
If it's not clear what I mean have a look at the updated code here. gist.github.com/bradphelan/10640228.
Apr
14
revised C# Tasks get result or catch exception
Corrected method names
Apr
14
comment C# Tasks get result or catch exception
You have made a common mistake in the above answer. You don't need to await in the body of your method. You can just return Task<string> result from ReadStringAsync and remove the async declaration from httpRequest.
Apr
11
revised Is the Roslyn model so C#/VB.NET centric that it precludes XAML analysis now and in the future?
Put note about the quote in the right place
Apr
11
asked Is there a way to disable custom patterns with a comment in Resharper
Apr
11
comment Is the Roslyn model so C#/VB.NET centric that it precludes XAML analysis now and in the future?
I've added a quote in an edit
Apr
11
revised Is the Roslyn model so C#/VB.NET centric that it precludes XAML analysis now and in the future?
Added a quote from blog to support conjecture
Apr
11
asked Is the Roslyn model so C#/VB.NET centric that it precludes XAML analysis now and in the future?
Apr
10
awarded Notable Question
Apr
10
awarded Announcer
Apr
10
asked Shortcut for creating tests / specs in Visual Studio in an associated assembly
Apr
8
accepted Switching on type in C# with no instance of the type
Apr
8
asked Switching on type in C# with no instance of the type
Apr
7
comment Why do I get "could not load type" when using DesignInstance in XAML
Tried that. Didn't make a difference
1 2 3 4 5