Possible Duplicates:
Enumerable.Cast<T> extension method fails to cast from int to long, why ?
Puzzling Enumerable.Cast InvalidCastException
Cast/Convert IEnumerable<T> to IEnumerable<U> ?
I'm trying to convert an array of integers to an array of doubles (so I can pass it to a function that takes an array of doubles).
The...
I am new to ASP.NET MVC, and am trying to link to downloadable files (.zip, .mp3, .doc, etc).
I have the following view: ProductName
which maps to: http://domain/ProductName
I have a .zip file that must map to URL http://domain/ProductName/Product.zip
Questions
Where do I place this .zip file in the MVC folder structure?
How do I a...
I'm trying to display the MS Word "Print Setup" dialog in a VSTO AddIn for Microsoft Word 2003. I can display the dialog box, but the options button at the bottom left corner of the dialog is always disabled as per the following screen capture.
The relevant code for what I've done so far is:
private void printSetup_Click(CommandBarBu...
I wanted to create REST friendly URLs with my WCF service endpoints by avoiding the use of .svc. I know I can accomplish this by using IIS rewrite module to append the .svc.
Does anyone else know of a better way to do this?
Please note that I am limited to .NET 3.5 and cannot use .NET 4.0 (so can’t use System.Web.Routing in .NET 4.0)
...
Which providers are there and your experience using them
I would like to know about all possible native .net Framework Entity Framework providers that are out there as well as their limitations compared to the default Linq2Entities (from MS for MS SQL). If there are more for the same database even better. Tell me and I'll be updating th...
According to MSDN:
defattr
Type: System.Boolean
If true, copy the default attributes from the XmlReader; otherwise false.If true, use default attributes; otherwise false.
And my question is what does the author mean by this?
...
Hello everyone.
I'm developing WPF applications using MVVM pattern. I have ViewModel with code like this:
public bool EditModeEnabled
{
get { return _EditModeEnabled; }
set
{
_ModeEditModeEnabled = value;
OnPropertyChanged("EditModeEnabled");
OnPropertyChanged("CommentTextBoxVisibility");
}
}
O...
Dear ladies and sirs.
I have an XElement instance and I wish to write to a stream using XmlWriter class. Why? Well, one of the configuration settings defines whether to use binary Xml or not. Based on this setting a suitable XmlWriter instance is created - either by XmlWriter.Create(stream) or XmlDictionaryWriter.CreateBinaryWriter(stre...
This is another question in the line of getting C# and PHP to exchange signed pieces of data. In my scenario, I have a signed C# assembly on the client side with a public key. I also have a PHP page on the server with a private key. I want to be able to sign some data in PHP with the private key and check the signature against the public...
Hi
Does anyone have a solution for the color bleeding when using a StateImageList with a Windows Forms TreeView?
Using the same ImageList with assigned to the TreeView's ImageList property, results in correct rendering as can be seen by the following image.
The state images are left, normal images are right. All images are sourced f...
I have an error in my website and trying to resolve: Error "format exception was unhandled"
such that it work for both date time as well as with string and integer.
Please see the details and code from this link http://tinyurl.com/ydg3u7s
Thanks
...
Hello.
Is it possible to setup vdproj so as new UpgradeCode is generated for every new .msi?
Why I need this. We have only one deployment project, only one application. It is very convenient (for non-developing audience) to double-click .msi file and reinstall it disregarding any other application already installed. Most often it is ne...
How to know the minimum system requirement for a .NET application?
say, what should be the system configuration to run the application?
How to provide the minimum system configuration, required to run the aplication?
RAM ?, Processor ? and all.
Application uses dotNetFramework3.5 and DirectX9 made in C#.
Is it all about trial and erro...
I'm filtering a datatable on a date range using DataTable.Select, my criteria string is:
"CreatedOn >='03/11/2009 00:00:00' AND CreatedOn <='03/11/2009 23:59:00'"
This filter returns no rows (even though I can see matching rows in the unfiltered datatable). However I notice if I change the criteria to (note the day/month transposition...
what is .net? the framework and clr
...
This thread depends on http://stackoverflow.com/questions/1861166/c-how-to-add-button-to-textbox.
Thanks.
...
I am working on a project that uses some plugins. These plugins are introduced during the run time. So i want to write on the data types of these plugins during run time. If i just want to save the changed settings during run time by using user settings and not use the customs file then what methods or properties should i use? I am tryin...
Hello,
I'm looking for a way to perform pointer operations in C# or .NET in particular.
I want to do something very simple
Having a pointer IntPtr I want to get IntPtr object which points to 2 bytes ahead.
I read some post that the foolowing snippet will work...
IntPtr ptr = new IntPtr(oldptr.ToInt32() + 2);
But I have doubts whet...
Hi, i have a couple of linq queries which I wanted to join
var IDs = from p in ctx.bam_Zending_AllInstances
where p.Zender == "RT30"
select new { Identificatie = p.Identificatie };
var latestIDs = from p in ctx.bam_Zending_AllInstances
w...
First time journey with (Fluent) NHibernate. What I am trying to do is to add conventions for the attributes in System.ComponentModel.DataAnnotations.
How would I add a Check Constraint for the attribute.MinimumLength? Here is my code so far:
Thanks!
using System.ComponentModel.DataAnnotations;
using FluentNHibernate.Conventions;
usin...