340,756 questions
5
votes
3
answers
3k
views
Generate sitemap on the fly
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 ...
158
votes
17
answers
51k
views
C# 3.0 auto-properties — useful or not? [closed]
Note: This was posted when I was starting out C#. With 2014 knowledge, I can truly say that auto-properties are among the best things that ever happened to the C# language.
I am used to create my ...
8
votes
13
answers
6k
views
Lingering assembly dependency in C# .NET
My C# project - we'll call it the SuperUI - used to make use of a class from an external assembly. Now it doesn't, but the compiler won't let me build the project without the assembly reference in ...
32
votes
1
answer
20k
views
Calling Table-Valued SQL Functions From .NET
Scalar-valued functions can be called from .NET as follows:
SqlCommand cmd = new SqlCommand("testFunction", sqlConn); //testFunction is scalar
cmd.CommandType = CommandType.StoredProcedure;
cmd....
21
votes
11
answers
41k
views
Best way to play MIDI sounds using C# [closed]
I'm trying to rebuild an old metronome application that was originally written using MFC in C++ to be written in .NET using C#. One of the issues I'm running into is playing the midi files that are ...
868
votes
17
answers
295k
views
Entity Framework vs LINQ to SQL [closed]
Now that .NET v3.5 SP1 has been released (along with VS2008 SP1), we now have access to the .NET entity framework.
My question is this. When trying to decide between using the Entity Framework and ...
22
votes
5
answers
50k
views
HTML Editor in a Windows Forms Application [closed]
We are looking for a WYSIWYG editor control for our windows application (vb.net or c#) so that users can design HTML emails (to send using the SMTP objects in the dot net framework) before sending.
...
8
votes
8
answers
1k
views
Using unhandled exceptions instead of Contains()?
Imagine an object you are working with has a collection of other objects associated with it, for example, the Controls collection on a WinForm. You want to check for a certain object in the ...
5
votes
2
answers
2k
views
When should I use Compiled LINQ vs Normal LINQ
I just read up on a performance of LINQ, and there is a HUGE amount to be gained by using Compiled LINQ.
Now, why won't I always use compiled LINQ?
0
votes
1
answer
832
views
.NET Interfaces
Over the past few years I've changed from having a long flowing page of controls that I hid/showed to using a lot of user controls. I've always had a bit of a discussion between co-workers on best ...
2
votes
7
answers
5k
views
What is the value-binding syntax in xaml?
I'm learning about binding in WPF. I'm having a lot of trouble debugging the parse errors in my xaml, though. What's wrong with this little piece? :
<Border Name="TrackBackground"
...
8
votes
4
answers
4k
views
How do I generate WPF controls through code
I was trying to get my head around XAML and thought that I would try writing some code.
Trying to add a grid with 6 by 6 column definitions then add a text block into one of the grid cells. I don't ...
97
votes
12
answers
24k
views
Anyone know a good workaround for the lack of an enum generic constraint?
What I want to do is something like this: I have enums with combined flagged values.
public static class EnumExtension
{
public static bool IsSet<T>( this T input, T matchTo )
...
6
votes
4
answers
1k
views
Animation in .NET
What is a good way to perform animation using .NET?
I would prefer not to use Flash if possible, so am looking for suggestions of ways which will work to implement different types of animation on a ...
10
votes
8
answers
2k
views
Performance Considerations for throwing Exceptions
I have come across the following type of code many a times, and I wonder if this is a good practice (from Performance perspective) or not:
try
{
... // some code
}
catch (Exception ex)
{
... /...
34
votes
7
answers
12k
views
Web Services -- WCF vs. ASMX ("Standard")
I am working on a new project. Is there any benefit with going with a WCF web service over a regular old fashion web service?
Visual Studio offers templates for both. What are the differences? Pros ...
19
votes
6
answers
12k
views
.NET 3.5 Redistributable -- 200 MB? Other options?
I've been using a lot of new .NET 3.5 features in the work that I've been doing, lately. The application that I'm building is intended for distribution among consumers who will probably not have the ...
126
votes
4
answers
24k
views
Why are unsigned int's not CLS compliant?
Why are unsigned integers not CLS compliant?
I am starting to think the type specification is just for performance and not for correctness.
8
votes
3
answers
873
views
VS 2008 - Objects disappearing?
I've only been using VS 2008 Team Foundation for a few weeks. Over the last few days, I've noticed that sometimes one of my objects/controls on my page just disappears from intellisense. The project ...
16
votes
5
answers
5k
views
Experiences of the Smart Client Software Factory
Has anyone had any experience in building a 'real world' application with the Smart Client Software Factory, from Microsofts Patterns and Practices group? I'm looking for advice on how difficult it ...
17
votes
9
answers
13k
views
Regular expression for parsing links from a webpage?
I'm looking for a .NET regular expression extract all the URLs from a webpage but haven't found one to be comprehensive enough to cover all the different ways you can specify a link.
And a side ...
6
votes
4
answers
2k
views
Should I provide accessor methods / Getter Setters for public/protected components on a form?
If I have .Net Form with a component/object such as a textbox that I need to access from a parent or other form I obviously need to "upgrade" the modifier to this component to an Internal or Public ...
19
votes
7
answers
4k
views
What is a good plotting library for .Net? [closed]
I'm writing some data acquisition software and need a gui plotting library that is fast enough to do realtime updated graphs. I've been using Nplot which is pretty good for a free library, but I'm ...
8
votes
3
answers
2k
views
How do you persist a tree structure to a database table with auto incrementing IDs using an ADO.NET DataSet and a DataAdapter
I have a self-referential Role table that represents a tree structure
ID [INT] AUTO INCREMENT
Name [VARCHAR]
ParentID [INT]
I am using an ADO.NET DataTable and DataAdapter to load and save values to ...
20
votes
1
answer
5k
views
How to reference to multiple version assembly
I'm developing a Sharepoint application and use .NET AjaxControlToolkit library, we are adding a custom aspx page to the Sharepoint. Sharepoint 2007 run in quirks mode so I've made some modification ...