.NET 4 introduced Code Contracts as a new feature. I'd like to use CC, but provide files that can still run in 3.5 SP1. Is that possible? Can I only use parts of the new functionality? Apparently it is possible to have CC only do static checks without being included in the binary files, is that correct?
I'm aware CC was available for 3....
Hi,
Anyone have any information (including website links) on the syllabus changes (if any) for this exam for .NET 4? I basically want to know if there will be change in the material covered.
Update to question:
After Steven's excellent observation, let me ask it this way: What will the syllabus of the application foundation exam for...
This is probably something silly I'm missing but I'm definitely lost. I'm using .NET 4 RC and VS 2010. This is also my first attempt to use UpdateModel in .NET 4, but every time I call it, I get an exception saying Value cannont be null or empty. I've got a simple ViewModel called LogOnModel:
[MetadataType(typeof(LogOnModelMD))]
public ...
suppose I have the following IronPython script:
def Calculate(input):
return input * 1.21
When called from C# with a decimal, this function returns a double:
var python = Python.CreateRuntime();
dynamic engine = python.UseFile("mypythonscript.py")
decimal input = 100m; // input is of type Decimal
// next line throws RuntimeBinde...
Trying to add some different filters (in addition to the ForeignKey filter) to a Dynamic Data Website in VS2010 using EF4. I can add the new Filter templates, but how do I specify which template will get displayed for each property in my model?
Thanks
...
I recently installed the RTM version of 4.0. I now receive an error when running MVC2 websites in a .net 4 app pool. The error is "User is not available in this context." All works fine on .net 2.0 app pools or if I run the app within the VS10 web server. The error only occurs in IIS on .net 4.0. To verify that it was not something speci...
I was wondering if anyone could tell me if this kind of behaviour is possible in C# 4.0
I have an object hierarchy I'd like to keep strongly typed. Something like this
class ItemBase {}
class ItemType<T> where T : ItemBase
{
T Base { get; set; }
}
class EquipmentBase : ItemBase {}
class EquipmentType : ItemType<EquipmentBase> {}...
When invoking a WCF service asynchronous there seems to be two ways it can be done.
1.
WcfClient _client = new WcfClient();
public void One()
{
_client.BegindoSearch("input", ResultOne, null);
}
private void ResultOne(IAsyncResult ar)
{
string data = _client.EnddoSearch(ar);
}
2.
public void Two()
{
WcfClient client...
First off, I am running this on a dual core 2.66Ghz processor machine. I am not sure if I have the .AsParallel() call in the correct spot. I tried it directly on the range variable too and that was still slower. I don't understand why...
Here are my results:
Process non-parallel 1000 took 146 milliseconds
Process parallel 1000 took 15...
Im trying to build an API using WCF and .Net 4, however when I throw the WebProtocolException, it is not displaying a nice error message like it should, instead it is treating it like an unhandled exception.
I am using the WebServiceHost2Factory.
Has anyone else used WebProtocolException with .net 4?
An example of my call is below
th...
Okay today, as most of you noticed Framework 4.0 has been released. I've been working on a project which is being built on framework 3.5. Since I want to use dynamic keyword and most of the asp.net features like Tableless Menu Control, ClientIDMode and clean web.config etc. I am kinda urging to migrate the unfinished project to 4.0 but I...
What's the difference between the two? They seem to have the same functionality at first glance.
Which one has faster performance which one is easier to use?
...
I have a webservice written with WCF 4.0 that exposes REST and SOAP functions, and I want to set up my unit tests so that as I work on my web services I can quickly test by having the test framework start up the service, outside of IIS, and then do the tests.
I want it to be dynamically generated as I am not certain what the interface w...
I know the answer for the beta was no (http://stackoverflow.com/questions/998090/can-i-use-net-4-0-beta-in-visual-studio-2008) but I was wondering if with the final release it would be different?
Thanks
Leo
...
I have different projects written in .NET 3.5 and some unit test projects to cover them. When converting my solution to be used in Visual Studio 2010 I keep all my projects in 3.5 but the unit tests are forced to 4.0? This way I cannot use them with my regular projects anymore.
Resulting in this:
Could not load file or assembly 'xxx.xxx...
Looking at the new VB 2010 features, I stumbled upon support for Auto-Implemented Properties.
Since I'm working with C#, this seemed quite familiar, but I noticed that VB did add a feature I would love to have in C#: setting a arbitrary default value for the auto-implemented property:
I really like the clean usage of auto-properties...
Can the CLR 4.0 execute CLR 2.0 IL without the need for source code recompilation?
...
I am running TeamCity on a virtual machine. I have installed the new Visual Studio 2010 release yesterday and converted my VS 2008 projects. I also have installed .NET Framework 4 on my virtual machine.
Before yesterday all my projects were building succesfully on the CI server but since I installed VS 2010 I get the following error me...
Hi there,
I just updated an app from .net 2.0 to .net 4.0 and i have noticed the following...
For example i have the following control..
<input type="hidden" name="ctl00$cphMain$hfdFueraHorarioOficinaConfirmado"
id="cphMain_hfdFueraHorarioOficinaConfirmado" value="False" />
and then in javascript i did this before..
var hf...
When Windows Server 2008 R2 was launched, the "server core" edition started to become useful to me, because it lets me deploy .NET background applications isolated on their own virtual machine instance with only a small fraction of all the disk space overhead of a default Windows Server installation, and very few Windows Updates. It come...