.net

Restoring window focus back to previous owner

I've got an application that sits in the system tray, which when double clicked on opens a window, fairly standard; however, when you close the window I'd like the window that was focussed before mine was opened to be given back focus. If I pop my window up by a keyboard shortcut, I'm able to restore the previous focus on close by using...

What's the best .NET game development framework ?

I have dabbled in the Microsoft XNA game development framework which seems quite good and just wondered if anyone has had any experience with the Dark GDK.NET from The Game Creators, or any others for that matter. Any advice on which to get started with would be great. ...

SSH Library for creating SSH connections in C#

Is there a commercial or free (preferably) library for a .NET language that I can use with C# to make SSH connections? I'm trying to run a windows implementation of rsync that doesn't support ssh (yet) through it. ...

Files in website deployment

Which files do I have to deliver when I do an ASP.NET (MVC or not) deploy? I want to know only the absolutely neccesary files. Also, how can I obfuscate some of them to prevent decompiling? I don't want to use the publishing wizard since it requires having FrontPage extensions installed on the server. ...

How do reflection and remoting work internally?

I am curious to know how Reflection and Remoting in .net work internally. I also hear that .net can use remoting to communicate with applications written in other languages (such as Java). How does that work? This is probably a large question so an answer that briefly touches upon each question is reasonable. ...

I don't understand Application Domains

.NET has this concept of Application Domains which from what I understand can be used to load an assembly into memory. I've done some research on Application Domains as well as go to my local book store for some additional knowledge on this subject matter but it seems very scarce. All I know that I can do with Application Domains is to ...

What method or event should I use prepopulate an extended ListView?

I've written an extended ListView in C# WinForms. It's purpose is to show a list of currently running applications using the WinAPI. However, If I try to populate the ListView in the constructor it works when I run the application, but if you try to put the control on any form it will crash VS 2008. The reason for the crashing is I beli...

Are Debug.Assert/Debug.Fail automatically conditionally compiled #if "DEBUG"

Are Debug.Assert/Debug.Fail automatically conditionally compiled #if "DEBUG"? Or is it more like if there is no debugger attached (even in release) it just doesn't do much of anything? If so, are there performance implications of leaving them in your code? Or are they really not meant to be in production code, only test or Conditional...

Is there a setting or good add-in for Visual Studio to color lines (like Throw) in the editor?

Is there a setting (didn't find one of hand) or good add-in (SO is better for recommendations than Google) for Visual Studio to color lines specially in the editor depending on what keywords or statements it contains? For example, if a line contains "Throw", it'd be nice to see either that word or the line in red, similarly for "Debug.A...

Publishing Problems

I have an ASP.NET web project that works perfectly on my computer. However, when I publish to the remote server, it crashes. The only page I see is the main startup page. If I click on any link I get an error page. The error page tells me that it can't tell me what the error is (for security reasons), and that I should set customError mo...

How can I set Headers with Silverlight GET HttpWebRequest?

Making a request to a RESTful service in Silverlight with HttpWebRequest works well so long as I don't add any headers to the request. As soon as I add a header using code like this var webReq = (HttpWebRequest)WebRequest.Create(new Uri(_RemoteAddress, "GetProviderMetadata")); webReq.Method = HttpMethodType.Get; webReq.Headers["SomeTok...

Circular dependencies versus DRY

I'm designing a re-usable class library that contains 2 assemblies (amongst others) named core.xml.dll and core.string.dll. The xml assembly references the string assembly in order to use some string helper methods. However now there is an string method that would be benefit from using a method contained in the xml assembly. If I...

Can a clickonce app be published on Ubuntu

Hello, C# 2008 SP1 I have built an application and this is published on windows server using clickonce. The clients go to the url and can download and run the application. The client is now changing their servers to run Ubuntu. Can a clickonce application be published on a server running Ubuntu. The version of Ubuntu is 8.10. Many th...

Conversion to Mono on a Mac

Hi all, I have a project written .NET 2.0 (well, it doesn't use much in the way of 3.5 features, anyway), and I recently got a Mac and would like to convert that project to Mono. The problem is, this project relies on libraries such as FreeImage and a few C++ libraries I've written for this project. I'm a total newb to programming on ...

Remote Dot net application

I have heard of remote dot net application. What I have understood that the application works on the client side, while it's on the server. This mean client can't access code and also need to connect to server to access application. I'm not sure of that, is that the purpose. Also does it have a relation with Windows Azure? some clarifica...

Is .NET 3.5 a reasonable pre-requisite for a media center plugin?

We have an open source media center plug-in. At the moment its download size is one measly megabyte. If I change my plug-in to require .NET 3.5, users may have to download 197 megs just to be able to use my plug-in. I am in the middle of a big refactoring process, and am aching to use some of the functional aspects of LINQ, which would...

How to dynamically display one of two Winforms tabs?

I have a TabControl with 5 tabs, and the contents of one of the tabs depends on some conditions or modes - Sometimes it needs to show one set of controls, on other times it should show an entirely different set of controls. What is the easiest way to achieve this? I tried setting up two different tabs, and using something like tab.Enabl...

Implementing indexing "operator" in on a class in C#

How would one go about implementing the indexing "operator" on a class in C# ? class Foo { } Foo f = new Foo(); f["key"] = "some val"; f["other key"] = "some other val"; in C# ? Searched MSDN but came up empty. ...

Expression trees for dummies?

I am the dummy in this scenario. I've tried to read on Google what these are but I just don't get it. Can someone give me a simple explanation of what they are and why they're useful? edit: I'm talking about the LINQ feature in .Net. ...

What alternatives are there to ClickOnce?

I've used ClickOnce a lot over the years but have run up against a lot of it's limitations. What alternatives are there for web deployment? So far the only one I've been able to turn up is ClickThrough, which is part of WiX now on the back burner. Are there any others out there that people have had success with? ...