tagged [.net-4.5]

How do I kick off an entity stored procedure in EF6 async and not wait for a return?

How do I kick off an entity stored procedure in EF6 async and not wait for a return? I'd like to just punt a call over to the SQL Server and not wait for a return. I have an imported Entity Function f...

Delay property on Binding from .Net 4.5 in .Net 4.0

Delay property on Binding from .Net 4.5 in .Net 4.0 How can I implement Delay property from .Net 4.5 (described [here](http://msdn.microsoft.com/en-us/library/system.windows.data.bindingbase.delay%28v...

5 Oct at 12:26

When to use the "await" keyword

When to use the "await" keyword I'm writing a web page, and it calls some web services. The calls looked like this: During code review, somebody said that I should change it to: ``` var Task1 = WebSer...

Visual Studio 2012 - Can't find System.Transactions assembly in .NET 4.5 framework

Visual Studio 2012 - Can't find System.Transactions assembly in .NET 4.5 framework I'm trying to add a reference to System.Transactions in a C# Visual Studio 2012 project, but System.Transactions isn'...

What .NET 4.5 (or earlier) higher-level constructs make Threading easier?

What .NET 4.5 (or earlier) higher-level constructs make Threading easier? Delegates are a few of the objects that make threading easier in .NET [reference](https://stackoverflow.com/q/1464922/328397)....

How to create new DataTable with column structure from other DataTable?

How to create new DataTable with column structure from other DataTable? As in title - the question is: How to create new DataTable with column structure from other DataTable? I need empty DataTable to...

25 Sep at 15:45

How can I create a new instance of ImmutableDictionary?

How can I create a new instance of ImmutableDictionary? I would like to write something like this: (using `ImmutableDictionary` from [System.Collections.Immutable](http://www.nuget.org/packages/Micros...

11 Feb at 08:20

Deserialize a property as an ExpandoObject using JSON.NET

Deserialize a property as an ExpandoObject using JSON.NET For example, there's an object like the next one: And it's used this way: If I deserialize a JSON string obtained from serializing the above i

ConfigurationManager Class not exist on .NET 4.5 Framework

ConfigurationManager Class not exist on .NET 4.5 Framework I just start working with .NET Framework 4.5 of C#. Am using Windows Form Application. I have do the needed imports such as : But actually th...

18 Oct at 04:35

what is the main difference between .net Async and google go light weight thread

what is the main difference between .net Async and google go light weight thread When calling runtime.GOMAXPROCS(1) in go the runtime will only use one thread for all your goroutines. When doing io yo...

8 Jan at 13:25

Strongly typed data binding and generics?

Strongly typed data binding and generics? Suppose I want to bind a generic type (here: `Dictionary`) to a Repeater using the new ASP.NET 4.5 strongly typed data binding. Then I would have to put down ...

Deserialize JSON to Dictionary with DataContractJsonSerializer

Deserialize JSON to Dictionary with DataContractJsonSerializer I receive the following JSON result int the response: I've prepared the following class for deserializating: ``` [DataContract] public se...

20 Feb at 13:57

How does Task<int> become an int?

How does Task become an int? We have this method: ``` async Task AccessTheWebAsync() { HttpClient client = new HttpClient(); Task getStringTask = client.GetStringAsync("http://msdn.microsoft.com");...

19 Nov at 20:16

EF5 Starting a Project:Error Running transformation: Please overwrite the replacement token '$edmxInputFile$'

EF5 Starting a Project:Error Running transformation: Please overwrite the replacement token '$edmxInputFile$' I'm creating a Console Project in VS2012 with .Net4.5. After it I "Add", "New Item" to the...

12 Jul at 05:36

Can a Dapper DynamicParameters object be enumerated like a dictionary of parameters?

Can a Dapper DynamicParameters object be enumerated like a dictionary of parameters? I know I can use a `ParameterDirection` with Dapper.DynamicParameters: But can I do so when using a `Dictionary

25 Sep at 02:42

Understanding context in C# 5 async/await

Understanding context in C# 5 async/await Am I correct that async/await itself has nothing to do with concurrency/parallelism and is nothing more than continuation-passing style (CPS) implementation? ...

Is there a managed API to manage IIS 8?

Is there a managed API to manage IIS 8? In IIS7, you used to be able to use the `Microsoft.Web.Administration` dll to manage IIS. I have added this reference to my project, however running the followi...

13 Jun at 12:4

Parse enum when string is lowered

Parse enum when string is lowered I have a pretty fun problem, which I am not sure you can even solve using this approach. I have some string, which is all lowercase. Let's just call it . Now, I have ...

12 Oct at 15:54

Which versions of SSL/TLS does System.Net.WebRequest support?

Which versions of SSL/TLS does System.Net.WebRequest support? Now that SSL 3 has been found to be vulnerable to the [POODLE](http://arstechnica.com/security/2014/10/ssl-broken-again-in-poodle-attack/)...

Prevent scrolling when mouse enters WPF ComboBox dropdown

Prevent scrolling when mouse enters WPF ComboBox dropdown When a `ComboBox` has a large number of items, its dropdown will become scrollable. When the user invokes this dropdown, and moves the mouse c...

25 Apr at 17:12

Is `_[....]` a valid identifier?

Is `_[....]` a valid identifier? I've just installed the .NET 4.5 reference source from Microsoft as I'm trying to debug an issue I'm seeing and I stumbled across the following in `HttpApplication.cs`...

20 Dec at 15:9

User.Identity.IsAuthenticated is false after successful login

User.Identity.IsAuthenticated is false after successful login I need to get the UserId Guid directly after a successful login. The following code doesn't work: ``` if (Membership.ValidateUser(txtUsern...

Large Object Heap Compaction, when is it good?

Large Object Heap Compaction, when is it good? First off, how big is considered large? Is there anyway to determine how large an object is in heap? .Net 4.5.1 comes with this `LargeObjectHeapCompactio...

8 Mar at 16:23

C# explicit cast - from collection of KeyValuePair to Dictionary

C# explicit cast - from collection of KeyValuePair to Dictionary I have a list of KeyValuePairs. I normally would use `ToDictionary`. However I just noted that the error message (shown below) has some...

19 Aug at 11:25

Does C# 7.0 work for .NET 4.5?

Does C# 7.0 work for .NET 4.5? I created a project in Visual Studio 2017 RC to check whether I can use new C# 7.0 language features in a .NET Framework 4.5 project. It seems to me that after referenci...

27 Feb at 14:33