.net

Creating a class field of type IList<>?

I'm trying to create a POCO object called Friend.cs. I can't seem to create inline properties for the IList. public class User { public string ID { get; set; } public string Name { get; set; } public string Rating { get; set; } public string Photo { get; set; } public string Reputation { get; ...

Utility to clean up a .net directory tree prior to archiving?

I'm sure this must have been asked before, but I can't seem to come up with the correct search to find what i'm looking for. I'm a .net Developer, and even though we use a version control system, i often find myself wanting to zip a .net solution directory tree, and want a utility to delete all the temp files that can be rebuilt from th...

dynamically populate a third dropdownlist by two independent (not cascading) dropdown lists

Hi I have two dropdown lists (one dynamically populated, the other not) that determine the values of a third dropdown list. The idea is that the first ddl1 is compulsory and ddl2 is optional. How can I get the null value (is not value is selected) of ddl2 once ddl1 value is selected. Thanks! <asp:SqlDataSource ID="SqlDataSource1" r...

Working with relative URIs

I'm having a little trouble with relative URIs I have a simple HttpListener app that is listening in on a given prefix (currently it is http://+:80/Temporary_Listen_Addresses/, but it could be any other valid prefix). For a any given request, I'm trying to work out what the requested URI is relative to that prefix, so for example if so...

Refresh/clear cache of app.config

I'm trying to get update values from app.config while it's running. I tried several methods but it still uses old values. How can I get correctly refresh it? I tried these but it didn't work: MessageBox.Show(Properties.Settings.Default.MyValue); Properties.Settings.Default.Reload(); Properties.Settings.Default.Upgrade(); Properties.Sett...

The best .net code that you have never see

Hwo the best .net code that you have never see??? ...

Troubleshoot code analysis

I try running code analysis on my solution. It fails with a generic error message that doesn't give any information. What is the best way to troubleshoot this sort of thing? For example is there a log file? ...

2D Graphical Editing Framework for PowerPoint or Visio style editing (.NET Prefered)?

Is there a good 2D Graphical Editing Framework for PowerPoint or Visio style editing? A .NET solution is prefered for our application. In our case, a lightweight solution is preferable to a heavyweight solution. We aren't looking for the full range of features found in PowerPoint or Visio - just the basics. ...

How does the .net SqlConnection object check that a connections string is syntactically valid?

System.Data.SqlClient.SqlConnection foo = new System.Data.SqlClient.SqlConnection(); foo.ConnectionString = "Data Source=myServer;Integrated Security=SSPI;"; // exception thrown on this line If I declare a new SqlConnection object in my .net code and then set the ConnectionString field to a syntactically invalid connect...

Using an OCX control in a C# .NET console application

As the title points out, what I want to do is use an .OCX control (namely AxShockwaveFlashObject) in a C# console application. I assume that it's possible, as I've seen it done before. but it was C++, and I don't even sure it was .NET. So, is it possible? and if so, how? Thanks, Leeron ...

Is there a problem in using System.Web in a desktop application

Hi I just added System.Web reference to a dll assembly, the assembly is for windows applications and for web applications. IF the assembly will be deployed on a server, System.Web will be shared using GAC, and there is no overhead. But what about windows clients. I am wondering if there are extra resources or any kind of problems ...

How to get HTML code of a .NET control

Hello all , I have a .net panel, and I want to send this panel via outlook to other recipients. For this I think I have to find the html code of this element. How to do that ? Thanks. ...

IDisposable and WCF

Hello, At work, I've found a helper class to manage WCF Services which implements IDisposable and has a ServiceAgent that derives from System.ServiceModel.ClientBase. The Dispose() method closes all the opened WCF services. The helper exposes methods that wraps calls to the methods of the ServiceAgent. Each method is build on that patte...

Why am I only able to download messages from my Gmail outbox via POP3?

I don't know how many developers are using the C#Mail library right now, but this is giving me a huge headache so I figured it couldn't hurt to ask. Maybe somebody else out there has run into a similar problem, with or without C#Mail. When I create a Pop3Client and connect to "pop.gmail.com" with my username and password (and Ssl = true...

facebook: Is there a documented way to send facebook updates from an external application?

Is there an official way for sending facebook updates (i.e. wall texts with links) from a (desktop) application? Does anyone know an existing .NET library for doing this? ...

Why is matrix multiplication in .NET so slow?

I don't quite understand what makes matrix multiplication in C#/.NET (and even Java) so slow. Take a look at this benchmark (source): Trying to find an updated benchmark. C#'s integer and double performance is damn close to C++ compiled with MSVC++. 87% as fast for double and 99% as fast for 32-bit integer. Pretty damn good, I'd say....

System.OutOfMemoryException

I'm trying to fix on an old, clunky, complicated legacy system with a memory leak. I've traced the problem back and the best way to describe the memory leak is that it's "by design." In simple terms, there is an event observer that is holding a reference to objects after they've been abandoned. For this reason objects can't be collected ...

visual studio windows mobile debugging not working

Hello I can't hit any breakpoints while debugging a .NET CF mobile application from Visual Studio 2005 on Windows 6 professional emulator. Debugging starts, application is loaded on the device but all breakpoints are disabled. Any hints? Regards ...

WCF Transport security with peertrust and self-signed client certificates

I'm been struggling with WCF for a while now and I can't seem to figure it out. I have a self-hosted WCF service with SSL enabled (using a signed certificate from a self-signed root CA), so far so good. The service is for business-to-business communication so certificates seemed to be the best solution. (I'm using the WS binding at the ...

How to do error handling in Windows .NET Services

This feels like a question that has probably been asked before but I couldn't find it so am asking (possibly again). I'm writing a windows service to do a bit of file monitoring and processing. Its all doing what I want but I am aware that there are several places that my code might throw errors when doing read/writes to the file system...