Questions for .net


8545

Is .NET MailMessage class injection-safe?

I wonder if MailMessage class is protected from e-mail injection. For example, should I check values before passing them to its constructor:
339

How do I set Network Management settings or make the dialog appear in C# on Windows Mobile?

In Windows Mobile, when you open Internet Explorer and type in a URL that your device can't connect to, you are notified of this and prompted to (manually) navigate to the screen where you can actu...
3382

Adapting wildcard characters to DBMS/Connections in .Net

A developper in my company has developped a C# project containing classes to execute SQL queries on the following DBMS :
8598

HTML/CSS/.NET Overflow only one line of table

I will try to be brief/detailed about what i am trying to do here.
7237

SMTP send email failure by SmtpClinet (SmarterEmail server)

I have configured and running SmarterEmail server, running SMTP service for 25 port, configured email account.
8294

which open source project(s) uses the castle activerecord?

Rather than the demos can you suggest any open source projects using castle activerecord for code study?
3890

I need help converting my driver user interface code

I have a custom driver I have written.
6588

Using LINQ find nearby places from database

We want to receive list of nearby places from database using LINQ in ASP.NET 2012 and would like some feedback on our strategy.
955

Directory Watch Class (.net)

I need a quick yes/no answer on this...
1541

Listbox extending off the page

I have a listbox inside of a stack panel inside of a border in a silverlight application and when ever I add anything to the listbox it increases in height so the scrollbar is never used and it ext...
1532

How to make a program to have its own version of PATH env

I want to know if I can have custom version of PATH env variable specific to my executable?
1792

WP7 - OrderedDictionary / alternatives?

I'm completely new to C# so I'm about to make a horrible attempt at my own version of an OrderedDictionary unless someone can suggest an alternative.
5812

Is it possible for a .Net 3.5-based web application to use 2.0-based libraries?

I feel like this is a dumb question and I'm missing something, but I haven't even figured out how to search for this one :(
7314

How to make each Treeview Node have a related TextBox

I am trying to make a form in which the user fills in values. It is quite long. I wish to use an expandable tree to fit it into my one form. Is there any way to give each TreeView Node a TextBox by...
6110

The database disk image is malformed sqlite

I have migrated my .net 2.0 projects to .net 4.0.
5856

how do you pull in the html from a URL?

I have one site that is displaying html content that needs to be displayed on another site (first site is front end to content management system).
4775

web service session works while debugging but not when its published

I'm finishing up my first web service. It stores data on a dataset that I later need to check up on, so I need to keep that information around.
4738

Is there any general purpose breadcrumbs management library/code in .net?

I want to make a msdn style breadcrumbs navigation
8594

decode querystring within context.Request

i have an ashx file that requires some query-string values to deliver appropriate images.
7996

What is the difference between CurrentCulture and CurrentUICulture properties of CultureInfo in .NET?

In .NET there is the CultureInfo class in the System.Globalization namespace. It has two similar properties both returning values of the CultureInfo type: CurrentCulture and CurrentUICulture.
4341

Executable fails with weird exception

I am using ILMerge and Quartz.NET in a C# .NET 4.0 Windows Service application. The app runs fine without using ILMerge, but now that we're nearing shipping release, I wanted to combine all DLLs in...
1642

Is there a library for notification/alert in .NET?

I need to design a notifications framework written solely in .Net. I was wondering is there were some libraries already available to ease in creating rules for the notifications.
8479

How to specify AddIn process names?

I am using the Microsoft AddIn Framework to load AddIn assemblies. I am running them in their own process as to separate them from the service. The thing I don't like it that every AddIn process ...
7170

In C#, can I know in the base class what children inherited from me?

I have a base class vehicle and some children classes like car, motorbike etc.. inheriting from vehicle.
4547

StringBuilder.AppendLine() does not make a new line

I am generating an email when an error occurs. I am using StringBuilder.AppendLine() and StringBuilder.AppendLine(String) to build up the body of the email, however the body of my email appears as ...
3928

Image sizes in a FileInfo variable

I'm currently working on a control which displays all images held within a folder so that the client is aware of what they have uploaded.
4526

ASP.NET: Problem with event handlers for dynamically created controls

I've got this problem with dynamically created TextBox.
9402

Which opensource java or .net project has best unit test coverage?

I want to dive more into the unit testing concepts. An open source project which will illustrate the best practices in unit testing is required.
8891

Database design and hosting solution

I'm trying to prepare to build a database driven .net application and I have hit a roadblock early on due to my lack of knowledge on this topic. Searching around didn't yield anything so here I am ...
9050

How do draw FormattedText (if not in the onRender method)

I draw some Ellipse and add them to a Grid.
3460

Can someone explain why this operation is invalid?

I was reading up on covariance and contravariance today and I came across a post on stack exchange where Jon Skeet was explaining invariance at the class level. He used an example of fruit and why
6587

A strange thing about Nullable Boolean type, And and Or in C#

I have a strange problem about the following codes:
1487

Report generator options for a Winforms app?

I’m selecting a report generator for my .NET winforms app and it’s driving me crazy. I’m not familiar at all with report generators so…
1567

Using old DLLs in C# .Net 4.0

this is actually a follow up to a question I asked yesterday about problems with using older DLLs in Visual C# 2010. I have added the configuration file and the DLL runs well. The issue I'm having is
1536

MSTest robustness

We have a number of issues with MSTest failing randomly on a list of 300+ .NET unit test. Is MSTest robust enough for serious unit testing or we need to look for a 3rd party tool?
6019

Implementing IComparable for Dynamic Comparision

I have to get a Circle from a List<Circle> depending on the current MousePosition
7275

how to watch a File System for change

I'm doing a project in a course at my university on distributed systems. I'm planning on creating something similar to Dropbox ( getdropbox.com ), but with some sort of non-centralized peer-to-peer...
2729

.NET Design View Not Running Windows Forms OnLoad

I have a windows application which works when the application is running, however in design view, the code in the OnLoad event crashes due to a host of reasons. Is there a way to do something like ...
6598

Castle/ Active Records: How do you count objects?

I'm trying to do a simple "Select Count(*) from PRODUCTS where date > xxx" with Castle on NHibernate.
2512

WindowsForms designer and GenericForm

Why doesn't the designer work if you inherit from an own written genericform?
2985

C#: Load roaming profile and execute program as user

In an application I need to execute other programs with another user's credentials. Currently I use System.Diagnostics.Process.Start to execute the program:
6735

Serializing immutable collections with protobuf-net

I'm trying to serialize a class with protobuf-net which contains an immutable collection as a member.
9682

How can I get the layers from a PSD file?

I want to retrieve all layers from a PSD file and get their name, X and Y position.
8732

Programmatically specify which version of .NET to load

My application is a native, non-.NET application. However, at times it may need to invoke some .NET services through COM. Sometimes it needs to load a specific version of .NET to accomplish what it
5779

Asp.net Web API - How to set the filename for a custom CSV Media Type Formatter

I have successfully implemented a Csv Media Type Formatter in my ASP.Net Web API project. I am able to get results back in Csv format. However the resulting filename is "parts" without an extensi...
9689

c# datagrid cell extraction

Hey im trying to store a string from a selected item in a datagrid as it has a filepath id like to use to delete.
240

Unit Testing - dependant tests

I am creating a list of unit tests that are dependant on each other. For example, my first test creates a record in the database and checks that the return value is greater than 0.
1593

Border will not show in WPF Control

I'm trying to programmatically set a border in class that is derived from System.Windows.Controls.Control.
7646

Using async/await for multiple tasks

I'm using an API client that is completely asynchrounous, that is, each operation either returns Task or Task<T>, e.g:
3203

adding files to listview in C#

I have a Listview and an "ADD" button,when I click on ADD i should be able to browse the files in computer, select files and when click OK or the Open, the file list should be added in the