Following on from my question here, I'm trying to create a generic value equality comparer. I've never played with reflection before so not sure if I'm on the right track, but anyway I've got this idea so far:
bool ContainSameValues<T>(T t1, T t2)
{
if (t1 is ValueType || t1 is string)
{
return t1.Equals(t2);
}
...
Ever since Microsoft introduced sql-server version code-named "Madison" the massively parallel processing (MPP) has got into picture. What exactly is it and how does sql-server is going to benefit from it ?
Further is massively parallel processing (MPP) related to parallel computing ?
I read about Madison here and about parallel compu...
Hello
What would be the best way to duplicate an object placed in a list of items and change a property of duplicated objects ?
I thought proceed in the following manner:
- get object in the list by "ref" + "article"
- Cloned the found object as many times as desired (n times)
- Remove the object found
- Add the clones in the list
Wha...
I am revising for the MCTS example and am on a small section regarding Culture-Insensitive comparisons. I get the principle, you don't two items which are the same (i.e dates) but are displayed differently and hence are pragmatically marked as different.
However call me stupid but I am finding it hard to see where I can use it is pract...
I have a class for message, and the objects are being displayed in a ListBox and there's a property for the message based on whether it's sent to or from the user. Is there a way to create two different styles and change them depending on this property?
...
I have a class MyClass with a method MyMethod. For every MyClass instance in a list of MyClass instances i want to invoke MyMethod and have them run in a separate thread. I am using .NET 4.0 and the Parallel extensions.
...
Is there anything similar to WPF and MVVM in Java world?
...
Consider this situation: There's a critical VB6 desktop application running on a production box. There is a possibility of installing a .NET application that queries the same DB that the VB6 application queries, which is an SQL Server 2000 DB. The VB6 application also depends on third-party ActiveX controls (registered .ocx files).
The...
Hi to all.
I need a free library (or not too expensive) for .NET to work with the excel document. I need to read data, modify, save and add charts into the document.
Or in another way, I need a free library for creating and inserting charts into the excel document (only for charts).
I have found FlexCel and SmartXLS, but FlexCel doesn...
After reading a few enlightening articles about memory in the .NET technology, Out of Memory does not refer to physical memory, 597499.
I thought I understood why a C# app would throw an out of memory exception -- until I started experimenting with two servers-- both are having 2.5 gigs of ram, windows server 2003 and identical program...
I need a sample/example demonstrating how to pass a config file as a parameter to a console application in .Net
...
We are using asp.net with .net 4.0
We want to allow users to upload any image and we want to create tiny avatar for uploaded image?
What is the best way to convert uploaded images for avatar?
We want to keep the same height width ratio
if we can convert gif, bmp, jpg, png to one standard format it would be greate. Which could be the...
Hi Guys,
I have just updated my nant script to compile my .net framework 4 solution.
And I got the above error while generating commonassemblyinfo.cs in my solution.
I visited msdn website and also added
<NetFx40_LegacySecurityPolicy enabled="true" />
in my web.config under runtime->configuration.
But that didn't solve my problem.
Ca...
I have two classes, a base class and a child class. In the base class i define a generic virtual method:
protected virtual ReturnType Create<T>() where T : ReturnType {}
Then in my child class i try to do this:
protected override ReturnTypeChild Create<T>() // ReturnTypeChild inherits ReturnType
{
return base.Create<T> as ReturnTyp...
Hey Guys,
I am wondering if anyone can shed some lights on the situation. I am about to start a project and trying to figure out what solution is best to go with asp.net or java jsp pages
I have personally worked alot with .net and am really happy with the framework and Visual studio as IDE I find it easy to work with and there is a ...
I once heard of a guy managed to install original Microsoft .Net Framework on Linux and successfully run Mono-incompatible .Net applications using bleeding-edge MS C# features. Any idea how could he do it?
...
Hi stackoverflow,
I've been working in silverlight to do a date-oriented application. I started off with changing the calendar template to contain a listbox on every date, and I created a listbox containing simple items.
I implemented an easy drag drop on both those elements, so now I can drag from the listbox containing the items to t...
I need to be able to load web pages from different sites within a page on my site. I am using C# .NET and master pages. Within the content page, I want to be able to load an arbitrary page and display it without any of the browser controls appearing - just the page content.
...
I have just rolled a custom configuration section, created an accompanying schema document for Intellisense and added it to the Web.config's Schemas property as per Michael Stum's answer to another similar question.
Unfortunately, and possibly due to me creating the XSD by hand with limited knowledge, the Intellisense relies on an xmlns...
I'm using some CLR objects that use the INotifyPropertyChanged interface and use the PropertyChanged function to update in WPF bindings.
Pretty boilerplate:
protected void RaisePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}...