.net-3.5

Will a REST interface slow down my search engine?

To get a search website built quickly I plan to split the work between two teams: One to build the search engine and one to build web UIs (mobile/desktop). My plan is to build the search engine as a set of REST services based on .NET 3.5. UIs may be built using some other technology. Questions: is the REST interface likely to be a perfo...

Problems seeing the last node in a TreeView

I'm having an issue with the TreeView in Visual Studio 2008. I'm adding the TreeView to my form, loading it with data at runtime, and then the last object in the list ends up being farther down than the scroll bar will go. The only way to see this object is by opening up one of the other nodes and closing it. Does anyone know a way of...

Why can't I see the ToolStripButton as a choice in the StatusStrip Items Collection Editor?

Using Visual Studio 2008 and C# 3 with .NET 3.5 I've added a StatusStrip control to a form and the only controls I can add through the designer are: StatusLabel ProgressBar DropDownButton SplitButton I want to add a ToolStripButton but I can only do so from code in the .designer.cs file. This way I would see it in the designer but I...

How can I get a count of "Available" processors for my application?

I know how to get the number of physical, and number of logical processors on my machine, but I want to know how many logical processors my application has access to. For instance, I develop on a quad core machine, but I have a number of single core users out there, and in many instances I "dumb down" the interface, or run into locking ...

C# 3.5 DLR Expression.Dynamic Question

I have inherited a small scripting language and I am attempting to port it to the DLR so that it is a little easier to manage. So far it has been fairly straight forward. I have run into a problem though attempting to dynamically call members of a variable. The current language runs on .NET and uses a parsing loop and reflection to do th...

C# .Net 3.5 Using Overloaded Indexers with different return types

I have a parent class which is essentially a glorified list. It's extended by several subclasses for various functionalities. public class HierarchialItemList<ItemType> : IEnumerable<ItemType> { public ItemType this[String itemCode] { get { foreach (IHierarchialItem curItem in...

Win Form app controls turn Black and app locks up when minimized too long

I have a Windows Form desktop CRUD application. The users are finding that if it sits too long minimized all the Controls turn to Black Filled Boxes and it becomes unresponsive. This is my first large app and I am having trouble even figuring out WHERE to start on this. Searching the Web for 'Black Filled Boxes' hasn't been real produ...

XML: A namespace prefix is claimed to be not declared when it fact it is

We've got a web service that returns a very simple XML. <?xml version="1.0"?> <t:RequestResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://our.website.com/ns/" xmlns:t="http://our.website.com/ns/"&gt; <t:Result>No candy for you today.</t:Result> <t:Success>false</t...

.net 3.5 deployment question.

Hi I am wondering if the full redistributable package of .Net 3.5 at this link include .net3.5 SP1 also or do we need to download it separately. The reason i ask is when we ship our cd to our client with .net 3.5 it will be nice to have both of them in 1 rather than 2. Please let me know. Thanks N ...

Using Reflection to analyze Parameters and their values

I've seen older posts here on SO, about one year old which would mean that they do not really cover .NET 4 or maybe even 3.5 on this topic. So here goes. If you with reflection were to fetch parameters for the current method ParameterInfo[] methodParams = MethodInfo.GetCurrentMethod().GetParameters(); Looping through each parameter w...

FirstOrDefault() off of a LINQ versus FirstOrDefault() with a Lambda?

I am a bit curious as to which is considered "best practice" when it comes to FirstOrDefault. I've already seen this question, which is similar to the question I have, but not close enough that it answers my question. Which of these is "better code"? and why? var foos = GetMyEnumerableFoos(); var foo1 = (from f in foos where f.B...

Send attachment with email using WCF

Hello, We need to build an email functionality in our application and the application will be based on Silverlight. In this application user will be able to send the email with attachement. So for this purpose we have realized that we need to build and utilize WCF service which is not a problem. The place where I am stuck is that how can...

In WPF, under what circumstances does Visual.PointFromScreen throw InvalidOperationException?

Suppose I wanted to do this, so I can find the current position of the mouse relative to a Visual, without needing access to a specific mouse event: public static Point GetMousePosition(this Visual relativeTo) { return relativeTo.PointFromScreen(GetMousePositionOnScreen()); } Sometimes (usually when I've just switched between two ...

Comparing two object state,before and after update

first things first. I have the following classes: class Employee { private int employeeID; private string firstName; private string lastName; private bool eligibleOT; private int positionID; private string positionName; private ArrayList arrPhone; public IList<Sector> ArrSector {get; private set;} //...

Error crops up after weeks of running a website.

I have a website based on Vs2008, .NET 3.5SP1 C# code. One of the functions requires it to interop with a COM-based DLL that creates PDFs. About once every 3 to 4 weeks, anything COM related (e.g. generating PDFs) is completely hosed. I get the following error: Creating an instance of the COM component with CLSID {7A91D523-4...

Web Reference vs. Service Reference

I just hit a huge brick wall with Paypal. I had created a regular C# project to create some wrapper classes using their WSDL. If you create a non-web project, the only option you get to add a wsdl is a Web Service Reference. And this builds kinda the same set of proxy classes as a Web Reference would but not really..it adds more that ...

Net 3.5 Machine Configuration

Which Machine.Config is applicable for framework 3.5 assembly ? ...

.Net: Is there a built-in TypeConverter or UITypeEditor to edit lists of strings.

Hi everybody! I wish to know if .Net-3.5 comes with a built-in List<string> or string[] TypeConverter or UITypeEditor so that I can edit this kind of property from a property grid. ...

Is there a neat workaround to the lack of foreign key identity columns in Entity Framework 3.5?

I'm having to downgrade a site from .NET 4 beta 2 to .NET 3.5. The biggest hurdle is all the foreign key identity values I reference/lookup, as this isn't supported natively in EF 3.5. Does anyone know of a reasonable work-around for this? An example of what I mean is: contacts.Where(contact => contact.TypeGuid == guid) [TypeGuid] ...

Java client program calling a .NET 3.5 web service

i have written a simple java stand-alone program that calls a .net 1.0 web service. no problem. if i take that same program structure and call a .net 3.5 web service, the java program fails. for whatever reason, the parameters passed to the 3.5 service are NEVER received. so can someone point the way to an example or tutorial where i ca...