.net

C# Telnet Library

Is there a good, free telnet library available for C# (not ASP .NET)? I have found a few on google, but they all have one issue or another (don't support login/password, don't support a scripted mode). I am assuming that MS still has not included a telnet library as part of .NET v3.5 as I couldn't find it if it was. I would loooooove to...

Play WMA Files in CF.NET 2.0

I'm using this code from Microsoft to play audio notifications for my application. It's working fine when the user chooses a wav file, but it doesn't play when they choose a wma file. Is there any way I can support wma files? A lot of the built-in alarm and ringtones seem to be wma. ...

System.Drawing in Windows or ASP.NET services

According to MSDN, it is not a particularly good idea to use classes within the System.Drawing namespace in a Windows Service or ASP.NET Service. Now I am developing a class library which might need to access this particular namespace (for measuring fonts) but it cannot be guaranteed that the host process is not a service. Now there is ...

.NET Newsletter Application

Hi, Are there any newsletter applications written in .NET available as open source software? Thanks. ...

Best Demo .NET Application For Showing to Potential Employers?

Hello, I am about to write a demo .NET application that I can add to my resume and show to potential employers. I have been out of software development for a while and thought that this route would be a good one for showing my capabilities. (as well as for building upon my capabilities!) I plan to write a desktop application. So...

Is there a way to do object (with its attributes) serializing to xml?

Create a class (call it FormElement). That class should have some properties like the metadata they have with data elements (name, sequence number, value—which is just a string, etc). This class has as attributes of type Validation Application Block Validation classes. I want to serialize it to xml and deserialize it. Verify that all...

Sort TreeView Automatically Upon Adding Nodes

Is there an easy way to add nodes to a WinForms .NET TreeView control where the new nodes being added are inserted at the correct index so the entire list of nodes is sorted alphabetically? Pretty much having the same result as TreeView.Sort(). I have a TreeView that continually grows to a couple hundred nodes. The user can view this Tr...

Make NameValueCollection accessible to LINQ Query

How to make NameValueCollection accessible to LINQ query operator such as where, join, groupby? I tried the below: private NameValueCollection RequestFields() { NameValueCollection nvc = new NameValueCollection() { {"emailOption: blah Blah", "true"}, ...

ArrayList vs List<object>

I saw this reply from Jon on Initialize generic object with unknown type If you want a single collection to contain multiple unrelated types of values, however, you will have to use List<object> I'm not comparing ArrayList vs List<>, but ArrayList vs List<object>, as both will be exposing item of type "object". What would be ...

How to get the IP address of a WCF remote endpoint ?

Is there a way to get the remote IP Address of a WCF connection? I guess the reason why it's not built-in into the WCF framework is that WCF can work with non TCP/IP bindings, so the IP Address is not always meaningful. However, the information would make sense for all the widely used bindings (As far as I know : BasicHttp, DualHttp, W...

Is there Any Off-The-Shelf Json Serialization helper class in .NET BCL?

I need to serialize/de-serialize some objects into/from string and transfer them as just opaque data. I can use XmlSerializer to do it, but generated string looks clumsy and long. So, is there any concise Serializer available in .NET? The first thing coming to my mind is that perhaps .NET should have JSON Serializer, but I cannot find i...

How to solve this focus problem with a dual monitor application?

We have an application that uses a dual monitor setup - User A will work with Monitor 1, and user B will work with Monitor 2 simultaneously. Monitor 2 is a touch screen device. Now, the problem is, when User A types something in his screen, if User B tries to do something, User A will end up in losing the focus from his window, which is...

Would you use LINQ to SQL for new projects?

I've been investigating what data layer to use for a new web-based project I'm designing and I'm very keen to look at incorporating LINQ to SQL. Its apparent simplicity, flexibility and designer support really appeals and the implicit tie-in to SQL Server is fine. However, it has been announced recently that LINQ to SQL will be taking a...

Anonymous Type vs Dynamic Type

What are the real differences between anonymous type(var) in c# 3.0 and dynamic type(dynamic) that is coming in c# 4.0? ...

multiple occurences of HandleCreated for a single control

I’m using control that needs to be register to asynchronous events. The events will be raised in the UI thread using the ISynchronizeInvoke interface implemented by WinForms controls I can’t register to the event at the constructor because it will allow calling the event handler before the control is fully created. during which calls to...

Thread Creation Event for setting CurrentCulture

Our application allows the user to change the Culture that they run it under and that culture can be different than the underlying OS Culture. The only way that I have found of doing this is by setting Thread.CurrentThread.CurrentCulture and Thread.CurrentThread.CurrentUICulture for every thread. The only problem with this is that we mu...

Asp.net session expiry redirect to login page

What is the best way to redirect to the login page when the session expires. I'm using sessionState mode="InProc" Can I set this in the web.config file? ...

What's with the "Afx" in StdAfx.h?

I'm just curious what Afx stands for. And what about Fx in FxCop? ...

VB.NET 2005 DataGridView Redraw

Hello Every one :D Description : I'm using a Global DataGridView which is been created once , then I'm sharing that grid ByRef on multiple User controls , the strange thing is -> first control adding or Initializing that grid will draw it all others controls will not draw it (For sure and I know why Its not drawing) Question : h...

How to get the "real" value of the Visible property?

If you set the Visible property of a Windows Forms control to true, that property still returns false if any of the control's parent windows are hidden. Is there a way to get the true, underlying visibility flag of the control in case the parent window is hidden? ...