.net

Problem with [DefaultValue()] inheriting ComboBox

Hello, for a project of mine I inherited a ComboBox to change its size behaviour. In addition to this i wanted, to speed up my forms' creation, to set the default DropDownStyle to ComboBoxStyle.DropDownList To do this i used the [Default()] command overwriting the DropDownStyle property [DefaultValue(ComboBoxStyle.DropDownList)] public...

Overrides a "list of base class" property and returning a "list of child class"

Hello, I have a base class (ex: Class1) containing a list of another base class (ex: ClassA). Each child class of first base class (ex: Class1AA, Class1AB,..) containing a list of child class of second base class (ex: ClassAA, ClassAB,...) The client must never know which child class is using, then i don't think i can use generic for m...

WP7 silverlight grid

In order to learn silverlight on WP7 I'm playing with it around and well, I can't say I'm having sweet times here. I'm developing a simple, yet ugly Mine game (like windows's ^^). The problem is that I'm gonna use a button for each case on the mines board, but I can't manage to find a way to preview a grid with cells containing my butto...

MCTS 70-515 Exam

I'm planning on taking mcts 70-515 exam. where do I start? are any of these things good/proven to work? http://www.exampapers.me/best-70-515-test-paper-23563.htm has anyone use these before? any input greatly appreciated. thanks ...

.Net Rounding Issue

Hello everyone. I have a rounding issue inside of .Net. I am rounding a 3 digit number down to two digits and it is causing some problems with one number. If I try to round 34.425 to two decimal places it should round it to 34.43. I am using the roundawayfromzero option and it has worked for every number in the program except for thi...

When is memory from a WCF Call Allocated?

I have a call to a SOAP WCF Service that returns a lot of data. More than the calling Windows Mobile Device can handle. Yet I am noticing something odd. When I make the call it looks like this: MyContract[] myContractArray = MyService.CallToGetLotsOfDataObjects(); That does not fail. But when it iterate through myContractArray and...

When NOT to use yield (return)

Possible Duplicate: Is there ever a reason to not use 'yield return' when returning an IEnumerable? There are several useful questions here on SO about the benefits of yield return. For example, Can someone demystify the yield keyword Interesting use of the c# yield keyword What is the yield keyword There is also a ques...

Is there an open source diff library for .NET (for text)?

Possible Duplicates: C# compare algorithms Any decent text diff/merge engine for .NET ? The question title pretty much says it all. I'm looking for a way to programmatically diff two text files. ...

Where do I look to see which .NET framework version I'm targeting in VS 2005 in a C++/CLI project?

EDIT: Sorry, forgot to mention this was a C++/CLI project. Does it show it somewhere or does it just target one by default? Also, can you change this in VS2005 or was this new to the later VS versions? ...

What kind of windows applications can receive system events?

What kind of windows applications can receive system events? I mean events like closed by user. Windows forms, WPF applications and Windows services can do that. But I am not aware of any others. ...

How to make only the login.aspx webform use HTTPS\SSL instead of the whole web app?

I would like the login form of my .net web forms app to use HTTPS but want the rest of the site to use HTTP only. What is the preferred method of doing this? The is .net 4.0 on IIS 7 (Win2k08 R2) I realize I can set up a new site listening on 443, but Session state would be lost between the sites. I don't want to track session using SQL...

Is it possible to check who is connected to your wireless network?

So after hours of research i have found nothing about this question. Is it possible to see who is connected to my wireless network using C#? Example: I have 2 Laptops - Laptop A and Laptop B. A is on running my program I made and connected to my wireless network. B is starting up and connects to my wireless network. A can now see tha...

Why does my .NET 4 targeted application need 2.0 installed to run?

I have a pretty complex WPF and C++/CLI application that was built using .NET 3.5. We've migrated to 4.0 to take advantage of the WPF goodies, so all our projects in the solution are targeting 4.0. On running our application on XP machines with just 4.0 (and MSVC++ 2010 [and 2008]), an error dialog will pop up with the message: "To run...

RSA Encryption in .NET - decryption in JAVA -> Java throws "modulus not positive" error.

I am having problems with our third party vendor implimenting an sso. They are receiving the following error when verifying my signature: java.lang.ArithmeticException: BigInteger: modulus not positive--at java.math.BigInteger.modPow(BigInteger.java:1556) I have no control over their Java code. Here is what I am doing now: I created ...

Recommend an extensible SMTP server

I have this weird situation where I have to accept email from my users. I want to be able to intercept an incoming SMTP message, see if it's authenticated (inspect the username/password myself and check those against my user database), then parse the message in full and do something (log a post in my application, for example). I need som...

regex expression

I am trying to get all the text between the following tags and it is just not workind If Not String.IsNullOrEmpty(_html) Then Dim regex As Regex = New Regex( _ ".*<entry(?<link>.+)</entry>", _ RegexOptions.IgnoreCase _ Or RegexOptions.Cul...

When does EndReceive return zero bytes

I'm trying to get a better handle on using sockets asynchronously. According to this article, http://msdn.microsoft.com/en-us/library/bew39x2a(v=VS.85).aspx, I ought to be able to check the number of bytes returned by EndReceive, and if it's zero, I know I have all the data, and if it's non-zero, there may or may not be more data coming....

Need to convert double or decimal to string

Hi I need to convert double to string with two decimal digits separated with 'dot' My concern is that dot must be always used as separator. ...

Weird behaviour with sockets on localhost

I have two .net applications communicating with sockets on port 5672 and everthing works fine. On server side, i open the connection with this simple code lines: IPAddress localAddr = Dns.GetHostEntry("localhost").AddressList[0]; TcpListener socket = new TcpListener(localAddr, 5672); socket.Start(); If i try to launch another...

Convert BMP to PCX C# Compact Framework

Has anyone dealt with converting a BMP to PCX in the .net compact framework. I need to convert a signature from a BMP to a PCX to be printed on a Zebra RW420 bluetooth printer. Any help would be greatly appreciated. Thanks! ...