tagged [c#-4.0]

How to Convert IEnumerable<T> to ConcurrentBag<T> in C#?

How to Convert IEnumerable to ConcurrentBag in C#? My linq query returns a collection of `IEnumerable`. How can I convert this into a strongly typed object of collection `ConcurrentBag` ?

9 Jul at 15:1

display it into the "Table1" table

display it into the "Table1" table Here are the methods mentioned above:

Class attribute [JsonConverter(typeof(StringEnumConverter))] equivalent in ServiceStack

Class attribute [JsonConverter(typeof(StringEnumConverter))] equivalent in ServiceStack Is there [JsonConverter(typeof(StringEnumConverter))] equivalent attribute class in ServiceStack? This is a Newt...

_=> what does this underscore mean in Lambda expressions?

_=> what does this underscore mean in Lambda expressions? What does an lambda expression like `_=> expr` mean? What is the purpose of `_` as input to lambda? Example:

26 Apr at 10:45

WPF triggers VS Converter

WPF triggers VS Converter Which is better to use performance wise? Limitation of Converter compared to trigger and vice verse. Shall I limit use of converter because it can cause class explosion?

19 Oct at 13:9

What instantiate-able types implementing IQueryable<T> are available in .Net 4.0?

What instantiate-able types implementing IQueryable are available in .Net 4.0? Within the context of C# on .Net 4.0, are there any built-in objects that implement `IQueryable`?

When should one use dynamic keyword in c# 4.0?

When should one use dynamic keyword in c# 4.0? When should one use dynamic keyword in c# 4.0?.......Any good example with dynamic keyword in c# 4.0 that explains its usage....

20 Apr at 12:10

C# - Are Dynamic Parameters Boxed

C# - Are Dynamic Parameters Boxed If I have: And then: Would 12 get boxed? I can't imagine it would, I'd just like to ask the experts.

30 Jun at 02:26

Storing 2 columns into a List

Storing 2 columns into a List How can I store data from 2 columns (from a database) in a List Any help is appreciated

Converting List<string> to byte[]

Converting List to byte[] How can I take a List and turn it into a byte array. I thought there might be some clever LINQ options for it but am unsure eg/List.ForEach

12 Apr at 15:47

How to backup Sql Database Programmatically in C#

How to backup Sql Database Programmatically in C# I want to write a code to backup my Sql Server 2008 Database using C# in .Net 4 FrameWork. Can anyone help in this.

Information about IronJS

Information about IronJS Can any one point out as where can I get some tutorials about IronJS and how to call a method written in IronJS from C# 4.0 Thanks C#4.0, IronJS

C# ModInverse Function

C# ModInverse Function Is there a built in function that would allow me to calculate the modular inverse of a(mod n)? e.g. 19^-1 = 11 (mod 30), in this case the 19^-1 == -11==19;

15 Feb at 13:25

Reactive Extensions OnNext thread-safety

Reactive Extensions OnNext thread-safety With the Rx `Subject`, is it thread-safe to call `OnNext()` from multiple threads? So the sequence can be generated from multiple sources. Will merge do the sa...

NoSQL databases that officially support MonoTouch

NoSQL databases that officially support MonoTouch I am having trouble finding a NoSQL databases that officially support MonoTouch via a local DB on the device. If their are, could someone provide a li...

27 Dec at 22:43

How to show tooltip on MS Chart

How to show tooltip on MS Chart I am using MS Chart control to draw graphs on Winform. I want to show the current (x,y) Value as tooltip on Mousedown on chartarea. How do I do that?

15 Nov at 12:6

Avoid giving namespace name in Type.GetType()

Avoid giving namespace name in Type.GetType() Returns `null` if the `namespace` is not present like: Is there any way to avoid giving the `namespace` name?

14 Feb at 20:56

Best way to compare two complex objects

Best way to compare two complex objects I have two complex objects like `Object1` and `Object2`. I need the fastest method to say if they are same or not. How could this be done in C# 4.0?

8 Jan at 17:59

ECMA-334 (C# Language Specification) v. 5.0

ECMA-334 (C# Language Specification) v. 5.0 Does anyone know when the 5th version of ECMA-334 (C# Language Specification) will be available? I guess they are updating the standard for the C# version 4...

14 Dec at 03:45

Why isn't there generic variance for classes in C# 4.0?

Why isn't there generic variance for classes in C# 4.0? If we have it for interfaces, why dont we have it also for classes? What would be the problem that we would incur when using it?

21 Jun at 10:29

Compile C# Code In The Application

Compile C# Code In The Application I want some code that compiles the code that is in my TextBox (for example). What I mean is I want to compile code after running the program. How can I do this?

30 Oct at 09:11

How to open Outlook's new mail window with prepopulated attachment

How to open Outlook's new mail window with prepopulated attachment I need to open a new email window with a prepopulated attachment when a user clicks some button or link in my application.

Why this file "ProjectName_TemporaryKey.pfx" gets created in my project?

Why this file "ProjectName_TemporaryKey.pfx" gets created in my project? Why does the file "ProjectName_TemporaryKey.pfx" get created in project? And what is its use in the project? I have EDM in my p...

17 Aug at 13:50

Double quotes in c# doesn't allow multiline

Double quotes in c# doesn't allow multiline e.g. I need to make it as for readability: How to achieve this, please suggest.

5 Jul at 05:55

C#-How to use empty List<string> as optional parameter

C#-How to use empty List as optional parameter Can somebody provide a example of this? I have tried `null`,`string.Empty` and object initialization but they don't work since default value has to be co...

4 Aug at 19:30