I just wrote this SerializationHelper class, but I can't believe this is necessary!
using System.IO;
using System.Xml.Serialization;
public static class SerializationHelper
{
public static string Serialize<T>(T obj)
{
var outStream = new StringWriter();
var ser = new XmlSerializer(typeof(T));
ser.Seria...
How can I retrieve the Created date from the current .NET assembly?
I'd like to add some realy simple functionality where my app stops working one week after the build date of the main assembly. I already wrote the code that kills my app after a given date. I just need to programmatically retrieve the creation date from the assembly.
...
Hi all, I was looking for ideas on improving the following code
static void Main(string[] args)
{
bool validInput1 = false;
string input1 = string.Empty;
bool validInput2 = false;
string input2 = string.Empty;
bool validFilePath = false;
string filePath = string.Empty;
try
{
Console.WriteLine("...
I have a List<T> and I do the following:
var myObj = List[2]; //Return object at position 2
myObj.Name = "fred"; //If you look at List[2] its name has changed to fred
I tried the following but it still updates the item in the List
var newObj = new MyObj();
var myObj = List[2]; //Return object at position 2
newObj = myObj;
newObj.N...
Hello all,
I would like to be able to use .NET 3.5 types in an application based on .NET 2.0.
Basically we don't have deployed .NET 3.5 libraries in desktops but we need to use some classes from there. Any ideas how this is possible ?
Thanks,
Marios
...
Hello Friends,
I have this Class which is accepting a Dictionary<string,object> which is been invoked from different places in the code. Dictionary concept is making things untyped and difficult to figure out what to pass the class to function otherwise it throws run-time exception. As this Dictionary<string,object> is a contract defini...
I have a circular progress indicator. I'd like to add this progress bar to an application I'm working on but don't know how to wire it up correctly.
In my app, I want to hit the "Process" button and have the progress bar displayed while the data is being processed. When the processing is complete, I want the progress bar to hide.
I don...
I've got this to work using a very basic example(outlined below) and I want to see if other SOers have experience doing what I'm attempting...using a 3.5 framework assembly in a Script Task in SSIS 2005.
I've basically followed the page found here... except I targeted the 3.5 framework while in Visual Studio 2008.
Write/compile your c...
Basically I'm working on a program that processes a lot of large video and image files, and I'm struggling with the memory management side of it because I've never dealt with anything quite like this before.
For instance, it stores all these images in a database, and loads a list of videos, and then you can switch between the videos an...
Is there an easy way to give rounded corners to the boundary of a DataGrid in Silverlight 3?
Thanks a bunch!
...
Our company currently has a web site which is deployed in Windows 2000 OS, which means that we could only install .NET 2.0 on that machine. Upgrading the Webserver OS is out of the question, since this web server also hosts other web applications in our country. As also part of our IT's policy, for security reasons the web sites are not ...
Is anyone working on a .NET Compact Framework port of AutoMapper or are there any similar mapping libraries for the .NET Compact Framework?
...
the reason I asked the question was because after reading the msdn advice on overloading this operator at the end of the page it mentioned:
A common error in overloads of operator == is to use (a == b), (a == null), or (b == null) to check for reference equality. This instead results in a call to the overloaded operator ==, causing a...
I am using Entity Framework now and using a stored procedure to populate my entity.
Where there is no problem with populating my entity, but when i trying to bind the result to a gridview control with "Enable Paging" set to true, it gives an error saying
"The data source does not support server-side data paging."
I am using stored proc...
How can i show a Save as window in asp.net and C#...
This is similar to the one that opens for uploading but that window is the open file...
I am not looking to save only one file...like
Response.AddHeader("Content-Disposition", "attachment; filename=" + myfile.Name);
can i make it ung ajax... please help... samples or suggestions....
Hi there,
I'm currently using Entity Framework at my job, but I've recently try to get it on my personal computer but I still didn't find a way to get it. Sure, I've searched on google but not really find any exe and not any thread that explain that.
Thanks to help me out!
** EDIT **
I've now access to System.Data.Entity. But I've no...
Do all versions of Windows 7 include version 3.5 of the .NET Framework?
...
I have an entity class that has 10 fields. I am using MS Validation Application block to mark all fields as mandatory (IsRequired). I am implementing a securiy feature in which during updation of the data, not all the fields in the entity class will have data. For example a few users can only view 5 fileds while others all 10 fields dur...
i'm using some components. When page render, components generate html comment tags. if i'm using this component 10 times on one page, html comments inserted 10 times.
How to remove html comment tag before render page?
...
I am not sure if anyone can help with this, but I inhertied this code and I have no idea what the issue is nor am I familiar with the WndProc method. The area that is not running is the "' check for custom draw message" section. I need it to run the ProcessListCustomDraw(m) method so some thumbnails are generated. I beleive the origianl ...