I was just wondering, does the Silverlight runtime have to be downloaded/installed deliberately, or these days is there a chance that a fully-patched Windows machine will already have it?
...
Hi
i am trying to implement a generic method which allows to output csv file
public static void WriteToCsv<T>(List<T> list) where T : new()
{
const string attachment = "attachment; filename=PersonList.csv";
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearHeaders();
HttpContext...
I have an interesting challenge that I'm wondering if anyone here can give me some direction.
I'm writing a .Net windows forms application that runs on a network and uses an SQL Server to save and pull data.
I want to offer a mini "plugin" API, where developers can build their own assemblies and implement a specific interface (IDataMan...
Im trying to make a universal parser using generic type parameters, but i can't grasp the concept 100%
private bool TryParse<T>(XElement element, string attributeName, out T value) where T : struct
{
if (element.Attribute(attributeName) != null && !string.IsNullOrEmpty(element.Attribute(attributeName).Value))
{
...
I am trying to send an smtp email through gmail's smtp server using the code below:
MailMessage message = new MailMessage("[email protected]", "[email protected]", "Testing SMTP", "Test, yo");
SmtpClient client = new SmtpClient();
client.EnableSsl = true;
client.Host = "smtp.gmail.com";
client.Port = 587;
client.Credentials = new Netwo...
I've been working with Xml Serialization/Deserialization in .net and wanted a method where the serialization/deserialization process would only be applied to certain parts of an Xml fragment. This is so I can keep certain parts of the fragment in Xml after the deserialization process.
To do this I thought it would be best to create a ne...
Just tried creating a data connection to a SQL 2000 database in VS2010's Server Explorer using a .NET Framework Data Provider for SQL Server (versus OLE) and found that it didn't work.
VS2010 complained that I had to use SQL Server 2005 and up.
This used to work in VS2008 (using .NET Framework Data Provider for SQL Server instead of th...
I'm working with a customer that needs to migrate documents from their current document management system (not Sharepoint) into Sharepoint MOSS 2007 retaining document history and metadata. I've written a proof of concept using the Sharepoint web services and that looks promising, but the snag so far seems to be programmatically setting...
What are some best practices for using MEF in your code? Are there any pitfalls to take into account when starting your extensible application? Did you run into anything you should have known earlier?
...
The scenario I'm looking at is "This program uses Postgres. Oh, you want to just use it single-user for the moment, and put off having to deal with installing a database server? Okay, in the meantime you can use it with the embedded single-user database." The question is then which embedded database is best.
As I understand it, the two ...
I want to be able to break on Exceptions when debugging... like in Visual Studio 2008's Menu Debug/Exception Dialog, except my program has many valid exceptions before I get to the bit I wish to debug.
So instead of manually enabling and disabling it using the dialog every time is it possible to do it automatically with a #pragma or som...
How to get table COLUMN NAME for some entity property?
...
So I know there are lot of wrapers of libVLC.dll . But I just do not know what one is ready to do what I need...
What I need is simple...
in my C# programm I create some bitmap (once or twice per second)...
I now want to stream bitmaps live as video (in some format VLC can to offer me) to some http:localhost:port/ using VLC...
How t...
I am using the Rest Singleton WCF Service temple from the Rest Starter Kit. The temples uses sample item as its sample Item. i am attempting to replace that sample ITem with a custom type from web reference in my ASP.Net project .dll. The types and name spaces are found and i can replace the sample item in the code. when i run the ap...
I wish to be able to change the table a class is mapped to at run time, I can’t do this if all the mappings are defined with attributes. Therefore is there a way to define the mappings at runtime in code.
(I would rather not have to maintain xml mapping files.)
Say I have two tables:
OldData
NewData
and sometimes I wished to que...
I need to calculate the location of intersections between multiple date ranges, and the number of overlapping intersections. Then I need to show which date/time ranges overlap each of those intersecting sections. It is slightly more complicated than that so I'll do my best to explain by providing an example. I am working in VB.Net, but ...
I am doing some custom serializing, and in order to save some space, i want to serialize the decimals as int, if possible value wise. Performance is a concern, since i am dealing with a high volume of data. The current method i use is:
if ((value > Int32.MinValue) && (value < Int32.MaxValue) && ((valueAsInt = Decimal.ToInt32(value)) == ...
I'm struggling to get my head round how the HiLo generator works in NHibernate. I've read the explanation here which made things a little clearer.
My understanding is that each SessionFactory retrieves the high value from the database. This improves performance because we have access to IDs without hitting the database.
The explanation...
In System.Windows.Forms there are a PropertyGrid that displays properties of an attached object. Let's say MyTextBox : TextBox.
Now, I would like to display on it some MyTextBox properties, say only Size, Location and my custom property Date.
More that than, I would like to be able to change the real property names, say "Dimension", "...
I am using a 3rd-party .NET component which requires an XML configuration file.
I'm am using this in an ASP.NET application.
I get an error when configure the XML with the following dtd:
<!DOCTYPE prod-config SYSTEM "cache-config.dtd">
The error is as follows:
For security reasons DTD is prohibited
in this XML document. To enab...