I don't want to download Visual Studio 2010.
How can I start studying (not
developing real applications) C# 4.0
and .NET 4.0 with just a text
editor?
Can I just download C# 4.0 compiler
and .NET 4.0 framework and get
started? How?
I have got Visual Studio 2008 but I learn from SO questions that it can't do the job.
...
Hi,
I need to compile code conditionally by the CLR version.
e.g there's a code that I need to compile only in CLR 2 (.NET 3.5 VS2008) and not in CLR 4 (.NET 4 VS2010)
Is there a precompiler directive for the current CLR version that I can use inside an #if clause?
Thanks.
...
I'm on a team that's currently building a MOSS 2007 based application (which relies on .NET 2), and we'd like to leverage the Entity Framework v4 (which relies on .NET 4).
Is this possible?
...
The WCF starter kit has WebProtocolException to throw exceptions in WCF. Is this included in .net 4.0?
...
I need to implement 3 public methods that all rely on the same initial join. Would a solution like the one described below work?
The code below is an example, the real stuff is much more complicated, that's why I want to reuse it.
private Tuple<Customer,Order> GetCustomerOrders()
{
from c in customers
join o in orders
o...
In my database there's a datetime column "Created" with default value getutcdate(). I would like my EF datacontext to generate an insert query that doesn't set this column, and fetch the resulting value. Is there a way to do this?
I tried setting StoreGeneratedPattern to either None, Identity or Computed, I get an exception that DateTim...
Is it possible to define DateTime properties in entity objects that are of Kind == DateTimeKind.Utc by using either the .edmx file, or a t4 template?
When possible using t4, please describe how to change the property. Currently the property gets generated as:
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[Dat...
Possible Duplicate:
Whats the difference between dynamic(C# 4) and var?
What is the difference between dynamic and var keyword in .NET 4.0 (VS 2010). As per MSDN, the definition of dynamic is - Dynamic lookup allows you to write method, operator and indexer calls, property and field accesses, and even object invocations which by...
I want to learn to use Fluent NHibernate, and I'm working in VS2010 Beta2, compiling against .NET 4, but I'm experiencing some problems.
Summary
My main problem (at the moment) is that the namespace FluentNHibernate isn't available even though I've imported all the .dll assemblies mentioned in this guide.
This is what I've done:
1. I d...
I recently asked a question about using Fluent NHibernate with .NET 4 - I solved that problem, but met a new one.
Summary
My main problem (at the moment) is configuring the database. I'm following this guide, but trying to work against SQL Server 2008 Express instead, as that's what I'll be using and thus what I need to learn.
The fail...
Do Silverlight 4 applications require that they target .NET 4.
With the delay in .NET 4 and Visual Studio 2010; can I still get the advantages of Silverlight 4 running against the .NET 3.5 framework?
...
A useful convenience introduced in .NET 4 is Stream.CopyTo(Stream[, Int32]) which reads the content from the current stream and writes it to another stream.
This obviates the need for slightly tedious code such as this:
public static void CopyStream(Stream input, Stream output)
{
byte[] buffer = new byte[32768];
while (true)
...
OK, for some reason Microsoft removed System.Web but we can import System.Net.WebUtility and call HtmlDecode(), but how can we call UrlDecode()?
Please answer for .NET 4.0/VS2010 B2 ONLY.
...
I got this error in a WPf Application when calling the InitializeComponent. In the Designer I get this error:
Could not load file or assembly 'LCP.ScanLite.WindowsWPF, Culture=neutral' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String code...
I have a small C# library written in C# (and .NET4.0 B2). I use a resource assembly (let's call this XXXAssembly) containing resx files to provide the message strings which are used in other assemblies. When running a program by using these assemblies, I get the following lines (always happen to be 4 these 4 lines):
'AssemblyResolver': ...
I was thinking about how Regex.Match.Group wants to be dynamic:
Regex.Match (...).Groups["Foo"]
would like to be:
Regex.Match (...).Groups.Foo
I thought about writing an extension method that would allow:
Regex.Match (...).Groups().Foo
And tried writing it this way, but this isn't allowed (';' required by 'static dynamic')
pu...
The Managed Extensibility Framework is both a stand-alone project (currently targetting .NET 3.5) and part of the .NET 4.0 framework.
Suppose I create assemblies targetting .NET 3.5 that contain MEF parts. These assemblies will reference the stand-alone version of System.ComponentModel.Composition.dll.
Now suppose I create a MEF-enabl...
I just heard about BDD when I watch video of Scott Guthrie in Sweden. One of listener asked question to Scott about How VS2010 and ASP.NET MVC do to support BDD.
After that, I search about BDD (Behavior Driven Development) that focus on specification more than unit testing when compares with TDD (Test Driven Development). I found some f...
I can't believe how long it's taken me to fail at finding the answer to this seemingly obvious question.
Date SomeRandomMadeUpDate = DateTime.Now.AddMonths(randomMonths).Date;
Cannot implicitly convert type 'System.DateTime' to 'System.Date'
I can even call:
Date.Now
but calling .AddDays on it returns a DateTime.
Again,...
Hi,
consider the following two pieces of code:
public static Time Parse(string value)
{
string regXExpres =
"^([0-9]|[0-1][0-9]|2[0-3]):([0-9]|[0-5][0-9])$|^24:(0|00)$";
Contract.Requires(value != null);
Contract.Requires(new Regex(regXExpres).IsMatch(value));
string[] tokens = value.S...