I am used to create my Properties in C# using a private and a public field:
private string title;
public string Title
{
get { return title; }
set { title = value; }
}
Now, with .net 3.0, we got auto-properties:
public string Title { get; set; }
I know this is more a philosophical/subjective questions, but is there any rea...
I have a .NET 2.0 windows forms app, which makes heavy use of the ListView control.
I've subclassed the ListView class into a templated SortableListView<T> class, so it can be a bit smarter about how it displays things, and sort itself.
Unfortunately this seems to break the Visual Studio Forms Designer, in both VS2005 and 2008.
The pr...
Hi,
I'm trying to generate a sitemap.xml on the fly for a particular asp.net website.
I found a couple solutions:
chinookwebs
cervoproject
newtonking
Chinookwebs is working great but seems a bit inactive right now and it's impossible to personalize the "priority" and the "changefreq" tags of each and every page, they all inherit t...
What techniques do people use to "consume" services in the REST stile on .Net ? Plain http client? Related to this: many rest services are now using JSON (its tighter and faster) - so what JSON lib is used?
...
I have a WCF service that I have to reference from a .net 2.0 project.
I have tried to reference it using the "add web reference" method but it messes up the params. For example, I have a method in the service that expects a char[] to be passed in, but when I add the web reference, the method expects an int[].
So then I tried to setup ...
This should be fine seeing as the CLR hasn't actually changed?
The boxes running the C# 2.0 code have had .NET 3.5 rolled out.
The background is that we have a windows service (.NET 2.0 exe built with VS2005, deployed to ~150 servers) that dynamically loads assemblies (almost like plug-ins) to complete various work items asked of it. W...
A quick and simple question...
Why does C#.Net allow the declaration of the string object to be case-insensitive?
String sHello = "Hello";
string sHello = "Hello";
Both the lower-case and upper-case S of the word String are acceptable and this seems to be the only object that allows this.
Can anyone explain why?
...
All,
I've been tasked with updating a series of applications which are performance critical VB.NET apps that essentially just monitor and return networking statistics. I've only got three requirements: convert it to C#, make it fast, and make it stable
One caveat is that we "may" migrate from a .NET platform to linux "soon"
I will be ...
I'm in the process of starting a User Group in my area related to .NET development. The format of the community will be the average free food, presentation, and then maybe free swag giveaway.
What would you, as a member of a user community, look for in order to keep you coming back month to month?
...
Howdy,
I have been using Environment.GetFolderPath(Environment.SpecialFolder.Desktop) to get the path to the user's desktop for ages now, but since we changed our setup here at work so we use Folder Redirection to map our users' Desktop and My Documents folders to the server, it no-longer works. It still points to the Desktop folder in...
Many applications have grids that display data from a database table one page at a time. Many of them also let the user pick the number of records per page, sort by any column, and navigate back and forth through the results.
What's a good algorithm to implement this pattern without bringing the entire table to the client and then filte...
Consider this problem: I have a program which should fetch (let's say) a 100 records from the database, and then for each one it needs to get updated information from a web service. There are two ways to introduce parallelism in this scenario:
I start of each request to the web service on a new Thread. The number of simultaneous thread...
When should I not use the ThreadPool in .Net?
it looks like the best option is to use a ThreadPool. In which case, why is it not the only option.
What are your experiences around this?
...
I have a project where I would like to generate a report export in MS Word format. The report will include images/graphs, tables, and text. What is the best way to do this? Third party tools? What are your experiences?
...
The 'click sound' in question is actually a system wide preference, so I only want it to be disabled when my application has focus and then re-enable when the application closes/loses focus.
Originally, I wanted to ask this question here on stackoverflow, but I was not yet in the beta. So, after googling for the answer and finding only ...
I urgently need a C# profiler.
Although I'm not averse to paying for one, something which is free or at least with a trial version would be ideal since it takes time to raise a purchase order.
Any recommendations?
...
What would be a very fast way to determine if your connectionstring lets you connect to a database? Normally a connection attempt keeps the user waiting a long time before notifying the attempt was futile anyway...
...
Which is a good .NET based CMS out there (for creating a corporate website). I have used Kentico CMS for some time, and am moderately happy with it.
However, is there anything better out there. I would like the ability to develop my own custom asp.net templates for various page types and install them.
...
I'm trying to perform a LINQ query on a DataTable object and bizarrely I am finding that performing such queries on DataTables is not straightforward. For example:
var results = from myRow in myDataTable
where results.Field("RowNo") == 1
select results;
This is not allowed. Any ideas how to get something like this working? I'm amazed ...
I am in the middle of a "discussion" with a colleague about the best way to implement the data layer in a new application.
One viewpoint is that the data layer should be aware of business objects (our own classes that represent an entity), and be able to work with that object natively.
The opposing viewpoint is that the data layer sh...