Hello.
I'm having a little trouble with some casts that i cant figure out out to solve.
I have this interface and the following implementations:
public interface IConfigureServiceOnServer
{
void Configure(Service service);
}
public sealed class ServiceConfigurator : IConfigureServiceOnServer
{
...
}
I'm loading these types at ...
The MailAddress class doesn't provide a way to parse a string with multiple emails. The MailAddressCollection class does, but it only accepts CSV and does not allow commas inside of quotes. I am looking for a text processor to create a collection of emails from user input without these restrictions.
The processor should take comma- or s...
Hi, I'm trying to run a windows service that reads a file in a shared folder in another server. The problem is that the computer where the service runs is in a different domain (say DomainA) than the computer where the folder is shared (say DomainB). If I go to the computer in DomainB, I can't assign permissions to users in DomainA, beca...
How to make lambda like this
Action<EventHandler<TEventArgs>> adder = vs => GenericEvent += vs
using expression trees. This code doesn't work:
Expression<Func<EventHandler<TEventArgs>>> handler = () => GenericEvent;
var vs = Expression.Parameter(typeof(EventHandler<TEventArgs>), "vs");
var adder = Expression.Lambda<Action<EventHa...
Is it possible to create a file using the FileStream object in .net, specifying DeleteAfterClose option and allow read access to that file?
I've tried using:
System.IO.FileStream strBMP = new System.IO.FileStream(sFileName, System.IO.FileMode.Create, System.Security.AccessControl.FileSystemRights., System.IO.FileShare.ReadWrite, 1024, ...
What would be the best way to continuously send the mouse position to another computer in C#?
So far I use a TCP socket for transportation. I get the ToString() of MousePosition, convert it to byte[] and send that byte array. On the receiving side I append the bytes to a StringBuilder, parse it and construct a new point. At least it wor...
I use ShowBalloonTip method of a TrayIcon class to display a balloon tip. Is there a way to handle a click over this balloon? When i click over the balloon no event seem to be generated, and it only closes the balloon.
...
Is it appropriate to use the double type to store percentage values (for example a discount percentage in a shop application) or would it be better to use the decimal type?
...
I'm trying to send Key combinations like Shift F8, etc to a specific window. I am able to send F8 by itself by posing a WM_KEYDOWN, then a WM_KEYUP and specifing (int)System.Windows.Forms.Keys.F8 as the wParam, but can't figure out how to do it with the shift key. I've tried ORing it with System.Windows.Forms.Keys.SHIFT as well as Syst...
I'm going to design an Application (C# or VB.NET) which use .NET Framework to run for very long time. It may be restarted every year or even more...
Is there anything (using special design patterns or so) which I must care about in designing "Long time running applications in .NET"?
Is .NET ever a good platform for these kind of applic...
Hello, I have been developing an application in VS2010 and compiling it for the .NET 4.0 as the target framework. After integrating a library into my application, I get the following error message when I try to compile:
Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime wit...
As an example imagine you have a rectangular clock. The hand is made of a filled triangle with a border. The border is drawn with a gdi+ pen and the thickness can vary from 1 upwards.
The problem is, the hand should always be within the bounds of the clock face. Using pen Alignment.Inset solves this problem but, because it renders terrib...
Possible Duplicate:
What are the best RSS feeds for programmers/developers?
Hello,
Could You please give me good resources like(podcsats, blogs, news, etc.) about software development and it news specially in Microsoft technology but no only.
Good resource to improve skills by reading daily maybe once a few days.
I know cha...
Hi!
Question: I need to create, USING ILASM.EXE, framework 2.0 assemblies.
So far, I have seen that fw 2 ilasm: creates 2.0 assembies.
FW 4 ilasm, on the other hand: creates 4.0 assemblies.
So far I am cool.
Now I need to know: is there a way (perhaps an argument) that can be used to make fw 4 ilasm to create fw 2 assemblies?
Thank y...
I am having an issue getting the correct resource file entries and need some help ... here is my scenario
I have a series of projects that are a part of a large reporting solution that follow this format
Plugin.**Report
Reference (folder)
DataAccessLayer (folder)
DataSets (folder)
DataWrappers (folder)
Localization (folder)
...
I'd like to make a free open source library that will let .NET developers easily translate text using Googles free service.
Of course I can do it, but I'm not sure that it's TOS friendly.
Anyone shed some light? Is it kosher for me to do this?
...
I'm looking for a multi-threaded, segmented file download to integrate into a WPF application I'm creating. I've seen a lot of references to various projects in this space and I'm hoping that someone has built or used an API and/or service that can be easily integrated into my application. Thanks for your suggestions.
...
I'm looking for a way, in .NET, to split a string while ignoring split characters that are within quotes (or another delimiter). (This functionality would match what a typical CSV parser does if the split delimiter is a comma.) I'm not sure why this ability isn't built into String.Split().
...
I've got a macro that updates a copyright header with the most recent edit date.
The problem I have is that the macro currently reads through the entire file rather than just the first 6 lines (which is all it needs).
Is there a way to get the Macro to only read the first "X" lines rather than the entire file?
Private selection As Env...
Hi
I am looking at my performance in yslow and even though I gzipped my css and js scripts it says I should gzip my html page.
Compression reduces response times by
reducing the size of the HTTP
response. Gzip is the most popular and
effective compression method currently
available and generally reduces the
response size b...