.net

Memory leak using System.Forms.Timer

Here is the simplified block of code: private void timer1_Tick(object sender, EventArgs e) { using(Bitmap bmp = new Bitmap(48, 48)) { } } ...

How is marshalling performed when C++ code is called from C++/CLI?

According to this question it's possible to seamlessly combine managed and unmanaged code using C++/CLI. I don't quite get it - shouldn't there be marshalling between managed and unmanaged anyway? For example, I have InnerLibrary that is compiled as a native C++ .dll with a header published and C++/CLI OuterLibrary that calls code from ...

Remove unused classes and resources during build

This question is more of theoretical nature than of practical use. I know that there are several programs to find unused code, but this question is a little bit different then that. Would it be possible to find unused code and resources during or after the build and remove it? I've several 'generic' libraries which are shared acros...

xml from a message Queue serialise with WPF/c# interface

Hi guys, I am new to this technology so this might have been asked before and I do not know - so sorry to start with. I have a message Queue and I am designing a WPF interface for it. The actual message queue(MSMQ) contains information to do with trains(model trains) so i need to show their exact location in real time. From section t...

What kind of add-in / extension for VS 2010 should I create ?

I have managed to develop an extension for visual studio "Update web reference" action in form of a simple dll that takes care for some sharing of classes between different projects etc. Everything works at my local machine and now I would like to create some user-friendly package so that all the guys in our company can use it as well. S...

.Net Triplestore?

Anyone aware of any .net triplestores out there? I know there is a lot of Java stuff, but I'm more interested in a .net version. ...

Ironpython: IEnumerator

Hello, I have a method that returns an IEnumerable of some type. Now I was wondering how I can iterate the IEnumerable with Ironpython? thanks ...

Zoom To Point Not Working As Expected

I'm trying to implement a simple "zoom to point" functionality in WinForms. When the mouse is at the same point and the mouse wheel is scrolled in/out, it works great. When the mouse position is changed between scrolls, it jumps to that position and is very wonky. Here's the code for the control that you can add to a Form for testing: p...

Why does hiding the child form also hide the parent form?

I have three forms: A, B and C. Upon a button being clicked, A displays B. Similarly, B displays C. Both using the ShowDialog() method. However when I use the Hide() method (inside a Button Click event) on form C to close it, form B also closes. Why would this be? As far as I can see, it shouldn't be doing this. I certainly didn't wri...

Magical Object Database needed with .Net bindings

Hello, Lets assume im writing a program, my program has its own entities and such. And since I'm using an OOP .Net language (C#, but could be F# or Iron Python), my objects have weird OOP traits like inheritance, references to other objects, and hierarchical relationships. Naturally i want to save these all to my God damn database, an...

Service References vs Assemblies References, using WCF Services

I have a WCF Service (with servicecontracts, datacontracts, etc) , like this: [ServiceContract(Namespace = "http://company.com/MyCompany.Services.MyProduct")] public interface IService { [OperationContract] CompositeType GetData(); } [DataContract(Namespace = "http://company.com/MyCompany.Services.MyProduct")] public class Comp...

Does .Net have an analog of Java Apache Digester?

Hello, Could you please say me is there analog of Apache Digester but for .net? Thanks. ...

SOAP - Simple Object Access Protocol?

SOAP - Simple Object Access Protocol I find some Difficulty in understanding the expansion of SOAP. First thing, is it really Simple? Second thing, is it used to access Objects? Third thing, If it used to access objects then what are the objects it can access? Fourth thing, Is it purely object access protocol? ...

How to store mp3 as bytes in sql server

Possible Duplicate: how to read and write MP3 to database Hi I need to read and store mp3 files as bytes in sql server and C#.. How can I do that? ...

How to write a complete web application?

These questions were asked me in a technical interview: If we deploy an application on multiple server (like database server, web server) then, each request should be redirected to proper server, then how you will handle it in your code? How security pinholes will be handled in an application? What things should be considered while wri...

using free bound generic type as type parameter

Hi, Do you see a way to specify that my result type have to be MonadType< arg type > within this interface ? interface IMonad<MonadType> // where MonadType : GenricType<> { MonadType<T1> unit<T1>(T1 t) Func<MonadType<T1>, MonadType<T2>> map<T1, T2>(Func<T1, T2> f); } I get as an error : The type parameter 'MonadType' cannot...

Calling upgraded .NET webservice fromn legacy 1.1 code - SoapException

Hi all, I recently upgraded a .NET 1.1 webservice to .NET 3.5. After the upgraded web service was deployed our .NET 1.1 applications referencing this web service all threw the following exception: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction.... The .NET 1.1 applications ha...

Are Extension methods too expensive?

How much will it cost for my programs performance if i add Extension methods to it? Will it work slower or may be will load slower? Thanks. ...

MEF: How to manually configure Export for a contract implementation

Hi, I have a MEF's CompositionContainer, a contract (say IFoo) and a module (Prism module but it doesn't matter much here, just some component). I want in my module to register the contract's implementation (FooImpl). If it's Unity I'd do like this: unity.RegisterType<IFoo, FooImpl>(). That's all. With MEF I've puzzled. I have to mar...

Visual Studio Add-Ins: Can't get Document object from SelectedItems

Let me start by saying I'm new to developing add-ins for visual studio... When using the DTE2 object, I am attempting to get some info on the document that is currently selected. If I do something like this: DTE2 VisualStudioInstance = somethingOrOther; Document documentInfo; if(VisualStudioInstance.SelectedItems.MultiSelect == false)...