.net

Is this an abuse of the Settings Feature?

I've been storing collections of user settings in the Properties.Settings.Default object and using the Visual Studio settings designer (right-click on your project, click on Properties and then click on the Settings tab) to set the thing up. Recently, several users have complained that the data this particular setting tracks is missing, ...

Uncompress data file with DeflateStream

I'm having trouble reading a compressed (deflated) data file using C# .NET DeflateStream(..., CompressionMode.Decompress). The file was written earlier using DeflateStream(..., CompressionMode.Compress), and it seems to be just fine (I can even decompress it using a Java program). However, the first Read() call on the input stream to de...

Best Visual-Studio Like tool for Linux Development

I need to write a few programs for a project I'm currently working on and I'm very much used to Visual Studio 2008 and I do not mind programming in Python but I need to have a comfortable GUI programming ontop of the language itself, and it has to be well integrated and fast. I know that's a lot to ask for but is there any such thing out...

Microsoft API for Serial Communication - C#

I am trying to get two windows mobile devices to communicate with each other. The API I am using (EMDK) says: Any Microsoft API can be used for serial communication after the pairing is completed. So, can anyone point me to an example of serial communications using C# .NET (Preferably Compact Framework). ...

Retrieving information why .NET service was stopped in OnStop

I have a .NET service, based on ServiceBase: public partial class Service : ServiceBase Something initiates stop on this service. The stuff logged during service stop is consistent with a regular stop using SCM, but user states he didn't initiate it. I am not sure if that is some sort of crash, or user error. Since the OnStop method...

Optimizing independent foreach iterations in .NET3.5

Let's say I have foreach(int x in xs[]) // xs is an array of int { x++; } Each time through the foreach is independent of the others. Is there a quick way to instruct the CLR to do each on a seperate thread or speed it up by natively parallelising it? Maybe it already knows to do this. I know you I could create threads and start t...

Why is the .NET Colors class not static?

I was browsing the colors class's source in reflector and it's just a sealed class. But all members are static. So why would anyone create a copy of the Colors class? It lies inside: System.Windows.Media.Colors ...

gmail api: replying to emails already in inbox with vb.net

has anyone worked with gmail with vb.net? how do i access my inbox and find emails that were sent from a specific person and send a reply to them? i have a list of people with whom i keep in touch with from school and since i have not replied to them in a while, i would like to feed a list of email addresses into the program that would...

Any good web hosting service that support SOAP, WSDL, & Web Services?

I have a website, unpublished, it contains a web service that is written in .net. The rest of the website uses asp.net. I want to host the website in IIS. Anyone knows a good web hosting company that supports the above techniques? Most of them don't say clearly whether they support SOAP, WSDL, & Web Services or not. Thanks for any recomm...

Using a previously generated RSA public/private key with the .net framework

Hi all, I have a pre-existing public/private key pair for RSA encryption which I need to use in .net . All the examples I can find online demonstrate how to generate a new private/public pair and then encrypt/decrypt. ie. something like this: const int PROVIDER_RSA_FULL = 1; const string CONTAINER_NAME = "SpiderContainer"; CspParameters...

Capture coloured console output into WPF application

Similar to this question, except the console program being wrapped up in the WPF application produces coloured output, so it would be nice if I could capture the colour as well as the text. This is my first WPF program and I'm not sure how to go about finding/modifying the right control, currently I'm just using a TextBox which works bu...

NHibernate - Query by Example - Subquery

Hello, I know there are MANY ways to achieve the following in NHiberante - i am not interested in other scenarios. What I am wondering is if it is possible to automatically generate a subquery using a many-to-one relationship and a query by example in NHibernate. My setup is as follows: public class Customer { public virtual int ID...

How to set the FileOpenDialog to open at 'My Computer'

I wanted my FileOpenDialog to start at My Computer to show all available drives. You would assume you could set the InitialDirectory property to GetFolderPath(Environment.SpecialFolder.MyComputer), but this function returns "", which doesn't have the desired result. Digging around on Google I found this solution - which works... dlg...

How do a use a SecureString to create a SHA1 or SHA512 Hash?

I would like to use a SecureString varible within VB.NET and convert that to a SHA1 or SHA512 hash. How would I securely convert the SecureString to the Byte array that HashAlgorithm.ComputeHash will accept? ...

Going to jump into Powerbuilder. Any advice.

This might be a weird question. After all, most people want to jump OUT of PB not IN. However, after careful analysis, I feel that Powerbuilder can get things done so much more rapidly than C# in the sense its a 4GL. Now PB is becoming .NET enabled, I was thinking perhaps its a good tool. My main focus is developing enterprise applica...

How do I set the timeout when filling a temporary table based on a complex query?

How do I set the command timeout in the following situation? Just to clarify, I have already set the connection timeout in the Connection String, but I also need to set the command timeout because I want the query to be able to run 5 minutes if it needs to, but it times out in less than a few minutes. String reportQuery = @" compli...

How to develop a proxy server using DotNet?

Hai I am Developing an Windows application using C#.Net where I have to block certain websites from accessing by the user.So I am trying to develop a proxy server which can block the websites.Can some one suggest me how I can do this with an example or a site which can help me. Thank you Chaithu ...

What's the difference?

Possible Duplicate: String vs string in C# What's the difference between string and String, if any? They both seem to perform the same funtion, but the casing is different. So, there are only TWO things that are different (that I know of) and they are: When spelled with a capital letter, the color of its text is Blue in VStudi...

Which way is better Linq Select Query or For Loop to search something in generic List?

As far as performance is concerned, Which way is better Linq Select Query or For Loop to search something in generic List? ...

Should I rely on future developments in .NET related to asynchronous programming?

I have just started working on a reusable library. This library is going to be pretty big and since it involves communicating with external devices over various communication media (such as RS232, TCP/IP, Radio etc), I am thinking about providing support of performing operations that involves communication, asynchronously. I have read t...