.net

C# 3.0 Auto-Properties - Is it possible to add custom behaviour?

I'd like to know if there is any way to add custom behaviour to the auto property get/set methods. An obvious case I can think of is wanting every set property method to call on any PropertyChanged event handlers as part of a System.ComponentModel.INotifyPropertyChanged implementation. This would allow a class to have numerous properti...

How do you Install a SSL Certificate

Is there a tool or programmatic way to install an SSL cert to the default website in iis 6 and 7? Ideally I am looking for something that can be done via unmanaged code or .net managed code. ...

Is anyone using Entity Framework with an Oracle database?

I am wondering if anyone is already using Entity Framework with an Oracle database in a production environment? There seems to be no support for EF in ODP.Net and only 3rd party data providers (OraDirect) seem to be available to connect with Oracle. Someone mentioned asample data provider available on Codeplex but it is presented with th...

Should I return a strongly typed dataset from a webservice?

Should I expose a strongly typed dataset from a webservice and bind it directly in a client? or are there more sensible ways for asmx web services? I am doing CRUD operations (Create, Read, Update, Delete). I find working with datasets to be frustrating and difficult to work with when for example when inserting into a table within it f...

Mapping to Dictionary with iBATIS

Given a simple statement, such as: <statement id="SelectProducts" resultMap="???"> SELECT * FROM Products </statement> Is it possible to get a list of dictionary objects where the keys are the column names? ie. var list = Mapper.QueryForList<IDictionary<string,string>>("SelectProducts", null); IDictionary<string, string> dict = li...

String vs string

In C# there are String objects and string objects. What is the difference between the two? What are the best practices regarding which to use? ...

How do I programmatically create a TIF from a PDF in .NET?

Is there a library (preferably open source - similar to PDFSharp) that can be used to programmaticly convert a PDF to a TIF (using .net)? ...

What are some good resources for the document/view or composite application architecture?

Lately I've been working on applications that are relatively data-oriented. In general, they tend to be editors for data represented by classes that are related in odd ways. I've been handling it by having a UserControl for each type of object and as the selection changes the program displays the appropriate editor for the object. The...

What is the best way to sort controls inside of a flowlayout panel?

I am adding custom controls to a FlowLayoutPanel. Each control has a date property. I would like to sort the controls in the flowlayoutpanel based on the date property. I can't presort the controls before I add them because it is possible for the user to add more. My current thought is when the ControlAdded event for the FlowLayoutPanel...

Do C# Generics Have a Perfomance Benefit?

I have a number of data classes representing various entities. Which is better: writing a generic class ( to say, print or output XML) using generics and interfaces, or writing a seperate class to deal with each data class? Is there a performance benefit/ or any other benefit (other than it saving me the time of writing separate class...

How best to test the validity of XML from a method?

I have some WCF methods that are used to transmit information from a server application to a website frontend for use in binding. I'm sending the result as an XElement that is a root of an XML tree containing the data I want to bind against. I'd like to create some tests that examine the data and ensure it comes across as expected. ...

What is the best way to generate and print invoices in a .NET application?

I'm working on a billing system for a utility company, and we have the following requirements: Batch-generate and print approximately 1,500 bills per day that we then mail to customers Save the bill in a format that can emailed to the customer and also archived (probably PDF) Built with .NET with MS SQL Server database back-end I'd l...

How to improve performance writing to the database?

We log values and we only log them once in a table. When we add values to the table we have to do a look up everytime to see if it needs to insert the value or just grab the id. We have an index on the table (not on the primary key) but there are about 350,000 rows (so it is taking 10 seconds to do 10 of these values). So either W...

MS SSRS Report Builder: Semantic query execution failed.?

I have created an end user model and deployed it. Any report that I create and run gives me an error: Report execution error The report might not be valid or the server could not process the data. Semantic query execution failed. Invalid column name 'rowguid'. Query execution failed for data set 'dataSet'. An error has occurred duri...

Can you force the serialization of an enum value into an integer?

Possible Duplicate: How do I serialize an enum value as an int? Hi, all! I'm wondering if there's a way to force the serialization of an enum value into its integer value, instead of its string representation. To put you into context: We're using, in a web application that heavily relies on web services, a single baseclass ...

What is a solid, elegant, reusable piece of code for determining if an IEnumerable is empty, in .NET?

I'm trying to find the most reusable, yet elegant, piece of code possible for determining if an IEnumerable. In the ideal, this should be a function I can call absolutely any time I need to tell if an IEnumerable is empty. While I have developed an answer for .NET 3.5 that has worked well for me so far, my current thought is that there...

Which configuration method do you prefer in .net? Why?

You can use App.config; but it only supports key/value pairs. You can use .Net configuration, configuration sections; but it can be really complex. You can use Xml Serialization/Deserialization by yourself; your classes-your way. You can use some other method; what can they be? ... Which of these or other methods (if there are) do you...

Getting started using Linq, what do I need?

Basically what the title says. (Forgive me because I am a .NET newb) In my department, we have a server running .net 3.5 and ever since I got into this section I have been using LINQ. However, I am starting a personal project on a different server (obviously), so 2 questions: What do I need to get up and running with LINQ? What doe...

Good alternative to GenuineChannels for .net remoting

We have been using GenuineChannels in our product for the last 4 years. GenuineChannels now appears to have become unsupported and the main developer guy Dmitri has I think joined Microsoft. I have the source as part of the product but not the networking / .net knowledge to support it. Has anyone found a good alternative to GenuineChann...

Book recommendations to update from VS2003 to VS2005/2008

I'm stuck in the world of VS2005 and .net framework 1.1. I'm only really interested in Winforms so never felt the need to move on. I am however now interested in seeing what is available now (latest .net framework and VS) and what has changed. Any good book recommendations? I don't need the VS / .net from scratch, I'm specifically lookin...