.net-3.5 Questions
3
Solved
I've been given a web service written in Java that I'm not able to make any changes to. It requires the user authenticate with basic authentication to access any of the methods. The suggested way t...
Ninny asked 1/9, 2009 at 23:32
7
Solved
Is there an advantage to dynamically attaching/detaching event handlers?
Would manually detaching handlers help ensure that there isn't a reference remaining to a disposed object?
Sinkage asked 11/9, 2008 at 20:40
2
Solved
Moq version: 3.1.416.3
We found a bug caused by an event not being unsubscribed. I am trying to write a unit test to verify that the event is unsubscribed from. Is it possible to verify this using ...
Dollie asked 26/9, 2013 at 8:38
5
Solved
I have a object:
ExampleClass ex = new ExampleClass();
And:
Type TargetType
I would like to cast ex to type described by TargetType like this:
Object o = (TargetType) ex;
But when I do thi...
1
Solved
is it possible (using LINQ preferably) to order a collection which has a natural grouping, within the groups themselves without upsetting the group order?
Let me explain. I have a collection thus:...
1
Solved
It would appear that the ContainerStyle is used in preference to the HeaderTemplate when both are specified, as below;
<controls:DataGrid.GroupStyle>
<GroupStyle>
<GroupStyle.Head...
Saretta asked 20/9, 2013 at 8:15
4
Solved
As disgussed in .NET Reflection set private property one can set a property with a private setter. But when the property is defined in a base class, System.ArgumentException is thrown : "Property s...
Replete asked 6/4, 2012 at 9:15
2
Solved
For example I have these two lists:
List<string> firstName = new List<string>();
List<string> lastName = new List<string>();
How can I concatenate firstName[0] and lastNa...
Ferrotype asked 10/9, 2013 at 5:51
2
Solved
Out of curiosity, I'm trying to get some simple async/await code to compile under .NET 3.5 Client Profile:
async void AwaitFoo()
{
await new Foo();
}
class Foo
{
public IFooAwaiter GetAwaiter()...
Allopatric asked 31/7, 2013 at 11:51
5
Solved
In one big solution we have about 100~ projects all targeting 3.5 and currently in VS.NET 2010.
Now we want to upgrade it to .NET 4.0, do I have to go one by one and change their target? or is the...
Malapert asked 2/4, 2011 at 15:17
1
I have a table called PersonTable with the columns: PersonId, RestarauntId, Age
I have a view called PersonView that does:
select PersonId,
RestarauntId,
RestarauntName(RestarauntId) as `Rest...
Woodcutter asked 19/7, 2013 at 17:13
4
Solved
I have a program that takes objects stored as XML in a database (basicly a message queue) and de-serializes them. Intermittently, I will get one of the following errors:
System.Runtime.InteropServ...
Brazilin asked 25/1, 2011 at 13:20
2
Solved
My ToolStrip covers my TabControl. I have played with the docking and anchoring but cannot figure out how to stop this.
My TabControl has Dock set to Fill.
Whatever my ToolStrip has Dock set to, ...
Zoom asked 16/7, 2013 at 20:22
2
Solved
I have a standard button on my WinForm with some text and an image. It looks like this:
How can I set the button so that the image is aligned just to the left of the text? I have tried ImageAlig...
5
Solved
I've just upgraded a VS 2008 project to VS 2010, converting the project but keeping the target as .NET 3.5 (SP1 is installed). My project worked without issue under VS 2008 on another machine.
I'v...
Disappearance asked 16/6, 2010 at 12:27
3
Solved
What is in and not in equals in LINQ to SQL?
For example
select * from table in ( ...)
and
select * from table not in (..)
What is equal to the above statement in LINQ to SQL?
1
I'm having trouble getting the PowerShell class to resolve. I'm following along with the example in this question.
I have a reference added to System.Management.Automation from C:\Program Files\Re...
Olnton asked 11/6, 2013 at 18:29
4
Solved
We are trying to move an application built in .NET 3.5 to 2.0 (reason to let our exe run on older machines with XP etc. which does not have 3.5)
While doing so everything is now stuck on one majo...
1
Solved
I have a list of Ids and I only want to do an AND on the first one and and OR on the subsequent ones. In the past, I have kept a counter variable and when the counter is 1, I do the And, but after ...
Gambill asked 30/5, 2013 at 14:43
4
Solved
I have the following array of integers:
int[] array = new int[7] { 1, 3, 5, 2, 8, 6, 4 };
I wrote the following code to get the top 3 elements in the array:
var topThree = (from i in array orde...
4
Solved
We get the above error message on our build server, when we build the solution or the specific project that the error refers to.
We can build the solution without any problem using visual studio (...
1
Solved
I'm building a RESTful API client using C# .NET 3.5.
I first started building it with the good old HttpWebClient (and HttpWebResponse), I could do whatever I wanted with. I were happy. The only thi...
1
Solved
Despite using the SaveOptions.DisableFormatting option in the following code:
XDocument xmlDoc = XDocument.Load(FileManager.SourceFile);
string element="campaign";
string attribute="id";
var ite...
Permeability asked 21/5, 2013 at 23:36
3
Solved
I'm building a chat server with .NET. I have tried opening about 2000 client connections and my Linksys WRT54GL router (with tomato firmware) drops dead each time. The same thing happens when I hav...
Zaffer asked 27/2, 2009 at 11:5
1
Solved
I'm trying to sort a list of objects using List.Sort(), but at runtime it tells me that it cannot compare elements in the array.
Failed to compare two elements in the array
Class structure:
...
Galvanoscope asked 15/5, 2013 at 11:35
© 2022 - 2024 — McMap. All rights reserved.