Questions tagged [.net-3.5]

The 3.5 version of the .NET Framework, which is based on the 2.0 .NET Framework with extra assemblies (including 3.0). Use for questions specifically related to .NET Framework 3.0. For questions on .NET Framework generally, use the .net tag.

The 3.5 version of the Microsoft .NET Framework, which is based on the 2.0 .NET Framework. In addition, it installs .NET Framework 2.0 SP1, (installs .NET Framework 2.0 SP2 with 3.5 SP1) and .NET Framework 3.0 SP1 (installs .NET Framework 3.0 SP2 with 3.5 SP1).

What's New in .NET Framework 3.5
.NET Framework 3.5 System Requirements

Released by Microsoft Corporation
Version Number: 3.5.21022.8
Release Date: 2007-11-19

5938 questions
74
votes
3 answers

NUnit Assert.AreEqual DateTime Tolerances

I'm wondering if anybody's found a good solution to this: In our unit tests; we commonly use Assert.AreEqual() to validate our results. All is well and good; until we start trying to use this on DateTime properties. Although the times are very…
Jim B
  • 8,344
  • 10
  • 49
  • 77
73
votes
1 answer

How can I "Click Through" a control in WPF?

I have an order entry form that has a ListBox with a list of line items. I have my items template, and one of the values is a ComboBox in each of my Items. Now, my form can also create Credit memo's in addition to purchase orders, but when I am…
Russ
  • 12,312
  • 20
  • 59
  • 78
73
votes
5 answers

How do I get all the values of a Dictionary as an IList?

I have a the following dictionary: IDictionary> myDictionary and I am wanting to get all the values in the dictionary as an IList.... Just to add a bit of a background as to how I've gotten into this situation.... I have a…
mezoid
  • 28,090
  • 37
  • 107
  • 148
72
votes
9 answers

Get first element from a dictionary

I have the following declaration: Dictionary> like = new Dictionary>(); I need to get the first element out, but do not know the key or value. What's the best way to do this?
cdub
  • 24,555
  • 57
  • 174
  • 303
71
votes
11 answers

How to detect installed version of MS-Office?

Does anyone know what would be the best way to detect which version of Office is installed? Plus, if there are multiple versions of Office installed, I'd like to know what versions they are. A bonus would be if I can detect the specific version(s)…
code4life
  • 15,655
  • 7
  • 50
  • 82
70
votes
7 answers

How can I get gzip compression in IIS7 working?

I have installed Static and dynamic compression for IIS7, as well as setting the two web.config values at my application Virtual Folder level. As I understand it, I don't need to enable compression at the server, or site level anymore, and I can…
Russ
  • 12,312
  • 20
  • 59
  • 78
69
votes
4 answers

LINQ - selecting second item in IEnumerable

I have string[] pkgratio= "1:2:6".Split(':'); var items = pkgratio.OrderByDescending(x => x); I want to select the middle value and have come up with this. Is this a correct way to select the second value in an…
Jon
  • 38,814
  • 81
  • 233
  • 382
68
votes
21 answers

Change the Textbox height?

How do I change the height of a textbox ? Neither of the below work: this.TextBox1.Size = new System.Drawing.Size(173, 100); or this.TextBox1.Size.Height = 100; I wanted to be able to change the single line text box height to fit a font size on it…
Guapo
  • 3,446
  • 9
  • 36
  • 63
68
votes
4 answers

Add parameter to Button click event

I have a wpf button like this: And I want to pass {Binding Code} passed as parameter to the button1_click handler. How do I go about…
Boris Callens
  • 90,659
  • 85
  • 207
  • 305
66
votes
7 answers

A method to count occurrences in a list

Is there a simple way to count the number of occurrences of all elements of a list into that same list in C#? Something like this: using System; using System.IO; using System.Text.RegularExpressions; using System.Collections.Generic; using…
Nona Urbiz
  • 4,873
  • 16
  • 57
  • 84
64
votes
3 answers

LINQ - Find all items in one list that aren't in another list

I'm stuck with a LINQ query (or any other efficient means of accomplishing the same thing). Can someone show me how I can select all the items in one list that are not present in another list? Basically, I have a list I formed by matching items…
John Humphreys
  • 37,047
  • 37
  • 155
  • 255
63
votes
11 answers

Get Absolute URL from Relative path (refactored method)

I am really surprised that there is no native .NET method to get an absolute url from a relative url. I know this has been discussed many times, but never have come across a satisfactory method that handles this well. Can you help fine tune the…
TruMan1
  • 33,665
  • 59
  • 184
  • 335
62
votes
8 answers

HTTP Error 500.22 - Internal Server Error (An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.)

I receive this error when I view an application. HTTP Error 500.22 - Internal Server Error (An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.) .Net framework 2.0, 3.5 and 4 are installed and I am using…
Varun Shenoy Basty
  • 621
  • 1
  • 5
  • 3
62
votes
1 answer

Generating numbers list in C#

I often need to generate lists of numbers. The intervals can have quite a lot of numbers. I have a method like this: public static int[] GetNumbers(int start, int end) { List list = new List(); for (int i = start; i < end; i++) …
Robin Hood
  • 633
  • 1
  • 5
  • 8
61
votes
1 answer

How to tell Pex not to stub an abstract class that has concrete implementations

I'm trying to use Pex to test some code. I have an abstract class with four concrete implementations. I have created factory methods for each of the four concrete types. I had also created one for the abstract type, except as this nice thread…
Andrew
  • 14,325
  • 4
  • 43
  • 64