Questions for .net


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:

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...

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 :

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

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

SMTP send email failure by SmtpClinet (SmarterEmail server)

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

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?

I need help converting my driver user interface code

I have a custom driver I have written.

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.

Directory Watch Class (.net)

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

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...

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?

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.

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 :(

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...

The database disk image is malformed sqlite

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

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).

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.

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

I want to make a msdn style breadcrumbs navigation

decode querystring within context.Request

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

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.

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...

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.

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 ...

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.

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 ...

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.

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

I've got this problem with dynamically created TextBox.

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.

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 ...

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

I draw some Ellipse and add them to a Grid.

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

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

I have a strange problem about the following codes:

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…

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

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?

Implementing IComparable for Dynamic Comparision

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

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 ( ), but with some sort of non-centralized peer-to-peer...

.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 ...

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.

WindowsForms designer and GenericForm

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

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:

Serializing immutable collections with protobuf-net

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

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.

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
7734 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...

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.

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.

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.

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:

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

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.