.net

.net object persistence

Can you please suggest a free, open source or low cost .net object persistence framework? I am not looking for ORM tools like NHibernate or Entity Framework. The closest commercial product that describes my need is fastobject.net framework. Thanks. ...

How to dynamically draw buttons in .NET windows app?

Hi, Time ago I created an application which has some buttons in the form. Now the customer wants me to modify the existing application so he can add custom buttons. Now there are some existing buttons (ex. button1, button2, button3...) and I have to create a button "Add new..." so the user can add a new button below the existing button...

How can I make this lambda work?

I have this code: String temp = txtForm.Rtf; foreach (ReplaceStrut rs in replaceArray) { temp = temp.Replace(rs.getNeedle(), rs.getReplacement()); } if (this.InvokeRequired) { this.Invoke(temp => txtForm.Rtf = temp); } else { txtForm.Rtf = temp; } But...

C# volatile array items?

Hi I need an array with volatile items, and can't find a way to do that. private volatile T[] _arr; This means that the _arr reference is volatile, however it does not guarantee anything about the items inside the _arr object itself. Is there any way to mark the _arr's Items as volatile? Thanks. EDIT: The following code built acc...

Can objects created with .net reflection be serialized?

Is it possible to serialize an object that is created through reflection? I get an error of "Unable to cast object of type 'testNameSpace.ScreenClass' to type 'testNameSpace.ScreenClass'" when attemping to perform the serialization of the object that was created through reflection. The error does not make sense since the types are ident...

.Net Screen scraping and session

I am trying to screen scrape using C#.It works for few times,after which i receive Session expired error.Any help will be appreciated. ...

.NET database connection pooling error occurred?

I have made connection string in web.config file. <connectionStrings> <add name="Test_registration" connectionString="Data Source=DOTNET\SA;Initial Catalog=Test2009;User ID=trainee;Password=trainee123" providerName="System.Data.SqlClient"/> </connectionStrings> And in CS file make a constructor for opening a connection. p...

Can I force memory cleanup in C#?

I heard that C# does not free memory right away even if you are done with it. Can I force C# to free memory? I am using Visual Studio 2008 Express. Does that matter? P.S. I am not having problems with C# and how it manages memory. I'm just curious. ...

How can I send input to Visual Studio using Windows API

Hello, I am trying to develop a util (using system-hook) for that works like an expander (user selects some text and presses a hotkey and it is expands). It should work with Visual Studio. I want to implement this using Windows API because I want to develop an app that works globally with any application (whether you're using VS, or wo...

C# GUI, have to display a huge table and make it sortable

Hi, I am making a small C# GUI application that reads table-like (cells, rows, columns) data from a binary file and displays it to the end user. Some files are very small (5 columns / 10 rows), but some are very big (245 columns and almost 50,000 rows). The one and only method I found to easily display a MsExcel-like table was DataGridV...

Is there an added cost of splitting code out to a separate library from your main application?

I can understand an added cost at application startup of loading a separate DLL, but is there an overhead when referencing code in a separate library? Say I have my application (be it ASP.NET WebForms, MVC or WinForms) and I decide for one reason or another that from a maintenance standpoint, it's better to have a couple of classes mov...

How can I convert an RTF file to a pdf file?

How can I convert an RTF file to a PDF one? I have the adobe PDF printer, should I use it? If so, how can I programmatically access it? ...

Microsoft CRM, how do I get all the members of a list using CrmService ?

I am developing a tool that needs to read data from Microsoft CRM using the webservice API. I need to get all the members of a marketing list. I can get all the lists in the system using the webservice, but I can't get the members of a list. This is the query I have so far, which I can run, but it does not return any members: Q...

What are effective strategies for documenting a large legacy .Net platform as the main developer just quit?

A very limited understanding is available across the remaining junior developers. Please share your strategies. ...

how to develop c#.net desktop base software?

i have to develop desktop base software in C#.Net which only produces reports and that reports can be export to any format. that software will be dump into CD/DVD and distributed to all clients and they will install it in their PC (Stand Alon PC). and that will be installer, client can install it himself. My problem is which database i ...

Interop assembly pointer length

Why does Visual Studio sometimes turn SAME pointer parameters in COM libraries into uint and sometimes to ulong? I have a COM library that has some methods with parameters such as [ in ] ULONG_PTR ParentWindow When I reference this library on my desktop computer, the interop assembly turns the ULONG_PTR into uint. When I do the same o...

reusable "save credentials" dialog (like IE's or Vista's) in .NET or Win32

Lately I've been working in an office with a wireless network which uses an annoying authentication scheme: every few hours, you need to open up a browser and type a username/password into an authentication web page, or you lose network access. (When the time expires, your next browser request will redirect to the auth page, and if your ...

Are there any lightweight publish/subscribe libraries for intra-app communication?

At work the product i get to maintain has a lot of "moving parts" one of the main sticking points I have with how its architected is that should ten different locations need to know that a new item in a list is selected, a direct code path must be coded. For example in the following layout. Form1 ...

Graphing library capabale of generating class diagrams

Hi, I need a library that is able to generate UML class diagrams for use over the web. Just images based on meta data would be fine, but if anybody knows of one that allows to draw over the web, would be even better. ...

Expression trees for code which doesn't type check

Is it possible to construct an expression tree in .NET 3.5 from code like Expression expr = () => (true + new object()) ? It seems to be impossible, since "A compiler-generated expression tree is always rooted in a node of type Expression", but I may be missing something. Obviously, such a tree can be constructed manually. ...