.net-3.5

How can I create an ItemsControl that renders each "item" as a point on a PolyLine?

I'm very confused by the MSDN samples. And all the samples I find generally revolve around text items in a StackPanel or something similarly simple. Given an array of numbers as the ItemsSource - ItemsSource = { 25 , 50 , 75 } the ItemsControl should procuce only this: <PolyLine Points="0,25 1,50 2,75" /> As shown, each item...

Error running aspnet_compiler on websites user controls

My builds and runs fine in Visual Studio, however when I run a Nant task to compile the website, it gives me an error: [path]\ContactView.ascx error CS0117: 'System.Web.UI.Usercontrol' does not contain a definition for 'Name' I have a UserControl called ContactView that has another UserControl called ContactForm. Contact Form is th...

Do I need to apply both 32 bit and 64 bit versions of a .NET Framework update?

There's a post-.NET 3.5 SP1 update which comes in x86 and x64 flavours: The KB article is here: List of the issues that are addressed by the Application Compatibility Update for the .NET Framework 3.5 SP1 There are two possible updates: NDP35SP1-KB958484-x86.exe NDP35SP1-KB958484-x64.exe Will the 64 bit edition also update...

Implementing Where() extension method on a System.Collections.Generic.SortedList

I have a private class variable that holds a collection of order items: Private _Items As New System.Collections.Generic.SortedList(Of Integer, OrderItem) What I'm trying to do it Get and Set a subset of the items through a Property on the class using the .Where() extension method of IEnumerable (I think). Something along the lines of...

Installation of .Net 3.5 creates problem in ASP.Net 2.0 site

Hi guys, I am working on ASP.Net 2.0 website and I have a strange problem. First let me give you details about my environment. I am using Win XP SP2 Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) Microsoft .Net Framework 2.0.50727 SP2 Backend is MySQL (uses CoreLab.MySql.dll) Now couple of days back I had to s...

32bit vs 64bit performance

I have a .NET assembly(3.5 framework) and it basically has a set of custom controls which does a lot of things like plotting points and stuff like that. The assembly is compiled as 'AnyCPU' so that I can use it in both 32bit and 64bit. When I tried to compare the performance of an application that uses this assembly in 32bit and 64bit, I...

C# 3.0 compatibility on .Net 2.0

What are the C# 3.0 language features we can use in an application that targets .Net 2.0 framework ? PS:I know few like Lambda expressions and var keyword ...

What features of .NET 3.5 can be used in a .NET 2.0 application?

I have an app that I am developing in Visual Studio 2008, but the projects are set to .NET 2.0. The application will run on a box that only has .NET 2.0 installed. I understand that I can use some of the features of the .NET 3.5 c# compiler and that it compiles my code to MSIL that .NET 2.0 runtime understands. What are the features o...

.NET version downgrade generates app.config. Do I need it?

Recently had to downgrade a project from .NET 3.5 to .NET 2.0 because it turns out that the target boxes will not have .NET 3.5 on them. When I did so (in VS2008), it created an app.config file in each project with this snippet of XML: <startup><supportedRuntime version="v2.0.50727"/></startup> Is this necessary? Do I need to ship t...

How can I reference an attached property as the source of a data binding?

Here's a much-abbreviated sample of my code. <Grid> <Polygon Name="ply" Grid.Column="2" Grid.Row="0" Grid.RowSpan="3" Fill="Orange" Stroke="Orange" Points="0,1 1,3 2,2 2,0 0,0" /> <Line Grid.Column= "{Binding ElementName=ply, Path=Grid.Column, Mode=OneWay}" Grid.Row= "{Binding ElementName=ply, Path=Grid.Row, Mode=On...

Can I instantiate a type based on a value in web.config?

I have 2 classes both inherit from the same interface. i want sometimes to run the website using one class and sometimes with another one. Want to decide which one to use based on a configuration value. Can i use web.config to decide which class to create the current instance from? ...

User advantage for .NET 3.5 over .NET 3.0

I've seen many questions on SO about .NET 3.5 advantages, but these are more leaned towards language features and easier development. Are there any non-developer-wise advantages for using .NET 3.5? Bugs, fixes, advantages over time? Background: Desktop application that works in conjuction with a device driver. We wanted to support ...

Naming an Extension Method Class

I'm just posting this for pure curiousity on what other teams have named their classes that contain .NET 3.5 extension methods. Extensions.cs ExtensionMethods.cs Helpers.cs what do you name yours and why, what's the intent of the name you chose and why did you chose one vs. another to hold extension methods? Not that it's a big deal, ...

How can I draw a "soft" line in WPF (presumably using a LinearGradientBrush)?

I'm trying to draw a line with soft edges, regardless of the slope. Here's the code I have so far: <Line HorizontalAlignment="Stretch" VerticalAlignment="Center" Stretch="Uniform" StrokeThickness="5" X1="0" Y1="0" X2="1" Y2="0"> <Shape.Stroke> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <...

webHttpBinding using webMessageEncoding: how to configure?

I have a REST WCF service. Its using a webHttpBinding and the configuration looks like this: <service name="IndexingService.RestService" behaviorConfiguration="IndexingService.Service1Behavior"> <endpoint address="" binding="webHttpBinding" bindingConfiguration="CustomMapper" contract="IndexingService.IIndexi...

Is Predicate<T> not available in .NET 3.0+

Is Predicate available anywhere in .NET? From MSDN http://msdn.microsoft.com/en-us/library/bfcke1bz.aspx, I don't see a Predicate anywhere. I see an anonymous that returns a boolean but no generics or a "Predicate" keyword. ...

Don't stop debugger at THAT exception when it's thrown and caught

In tools/exceptions, I've set the option that the debugger stops when an exception is thrown. Whether it is caught or not . How do I exclude an exception of that rule? Somewhere in my code there is a caught exception that is part of the program logic. So I obviously don't want that exception to stop the debugger each time it is hit. E...

How to debug external code after exception in .NET (vs2008)

Have Exception thrown in my app. In callstack I can see program stops at property's getter: FullName.get() I'm trying to find out what part of code is generating exception. But in call stack I can see only 3 entries: 3) FullName.get() 2) [External Code] 1) myApplication.exe Is is a way to debug external code somehow ? ...

How do I upgrade a .NET 2.0 website to 3.5?

My website is VB.NET 2.0. I already opened a it in VS2k8 and told it not to upgrade. Now I want to upgrade, how do I trigger it? All the posts say 'just open it in 2k8 and it will prompt you'. Well I did, and it did, and I didn't want to yet. Now I cant get it to come up. ...

Sharepoint 2007 : How to change a custom webpart webservice URL?

I have a MOSS 2007 Webpart that displays data obtained from an external webservice (not originating from sharepoint). It's created using VS2009, the webpart project includes a WebReference to my WebService and it uses the following code to make a connection (the url is configured in the WebReference): //get xml sitemap from webser...