.net

Is there a specification-based testing framework for C# .Net 2.0?

For example, Reductio (for Java/Scala) and QuickCheck (for Haskell). The kind of framework I'm thinking of would provide "generators" for built-in data types and allow the programmer to define new generators. Then, the programmer would define a test method that asserts some property, taking variables of the appropriate types as paramet...

Options for Connecting SAP to .NET

Need to integrate SAP with .NET applications. Is .NET Connector the best choice? What about NetWeaver? Simply looking to push data to and pull data from SAP. ...

How do you get a string from a MemoryStream?

If I am given a MemoryStream that I know has been populated with a String, how do I get a String back out? ...

XML to Excel (2007) Ideas using Windows XP, and C#.Net

I have a dataset that I have modified into an xml document and then used a xsl sheet to transform into an Excel xml format in order to allow the data to be opened programatically from my application. I have run into two problems with this: Excel is not the default Windows application to open Excel files, therefore when Program.Start("...

Reading files in use and system files on Windows XP & Vista using .NET

I have this idea for a free backup application. The largest problem I need to solve at the moment is how to access files which are being used or are system files. I would like the application to be able to perform a full backup of files (i.e. not on a disk sector by sector level). I'll turn the server part of the application into a ser...

Font rendering libraries for C# / dot-NET?

Are there any free, third-party libraries for rendering arbitrarily scaled and rotated text in dot-NET applications? Although native GDI+ allows for text scaling and rotation, its methods for determining the rendered text's dimensions are not sufficiently precise and the differences in kerning as text is added to a rendered string make i...

.NET and AMF

How can I get a ASP.NET (inc MVC) application talking to a Flex UI over AMF. I am wanting to push approx 100+ records around at a time and AMF would appear to be the way forward, but there doesn't appear to be anything obvious. ...

Cloning objects in C#

I want to do something like... myObject myObj = GetmyObj()//create and fill a new object myObject newObj = myObj.Clone(); ...and then make changes to the new object that are not reflected in the original object. I don't often need this functionality so when it's been necessary I've resorted to creating a new object and then copying e...

Passing data to Master Page in ASP.NET MVC

What is your way of passing data to Master Page (using ASP.NET MVC) without breaking MVC rules? Personally, I prefer to code abstract controller (base controller) or base class which is passed to all views. ...

Vista UAC, Access Elevation and .Net

I'm trying to find out if there is any way to elevate a specific function within an application. For example, I have an app with system and user settings that are stored in the registry, I only need elevation for when the system settings need to be changed. Unfortunately all of the info I've come across talks about only starting a new ...

Best way to differentiate MVC Controllers based on HTTP headers

Problem My current project requires me to do different things based on different HTTP request headers for nearly every action. Currently, I have one massive Controller (all for the same resource type), and every action method has an ActionName attribute (so that I can have multiple versions of the same action that takes the same parame...

Regex for Specific Tag

Greetings! I'm working on a regular expression in a .NET project to get a specific tag. I would like to match the entire DIV tag and its contents: <html> <head><title>Test</title></head> <body> <p>The first paragraph.</p> <div id='super_special'> <p>The Store paragraph</p> </div> </body> </head> C...

Frameworks simplify coding at the cost of speed and obfuscation of the OS. With the passing of Moore's law do you thing that there might be a shift away from Frameworks?

Frameworks simplify coding at the cost of speed and obfuscation of the OS. With the passing of Moore's law do you thing that there might be a shift away from Frameworks? I suspect that one of the reasons for Vista not being an outstanding success was that it ran much slower than XP, and, because computers had not improved as greatly i...

.NET (C#): Getting child windows when you only have a process handle or PID?

Kind of a special case problem: I start a process with System.Diagnostics.Process.Start(..) The process opens a splash screen -- this splash screen becomes the main window. The splash screen closes and the 'real' UI is shown. The main window (splash screen) is now invalid. I still have the Process object, and I can query its handle, m...

How to enforce all children to override the parent's Clone() method?

How to make sure that all derived C++/CLI classes will override the ICloneable::Clone() method of the base class? Do you think I should worry about this? Or this is not a responsibility of the base class' writer? Amendment: Sorry, I forgot to mention that the base class is a non-abstract class. ...

What is best for desktop widgets (small footprint and pretty graphics)?

If I were to want to create a nice looking widget to stay running in the background with a small memory footprint, where would I start building the windows application. It's goal is to keep an updated list of items off of a web service. Similar to an RSS reader. note: The data layer will be connecting through REST, which I already have...

Architecture for real-time system?

Hi, I would like to ask some advices or experiences from architecture or technology for building real-time system. Before I have some experience on developing "Queuing Management System", I have done by sending TcpServer and TcpClient message to all operators when a operator changed the queue number. But I think this strategy a lot comp...

Getting all types in a namespace via reflection

How to get all the classes in a namespace through reflection in C# ...

.Net Gridview alpha sorting, it needs to be numerically sorted

Hey guys, This is my first real question of need for any of those Gridview experts out there in the .NET world. I an creating a Gridview from codebehind and I am holding a bunch of numerical data in the columns. Although, I do add the comma in the number fields from codebehind. When I load it to the Gridview, I have the sorting abili...

Dealing with Date only dates across timezones in .Net

Ok - a bit of a mouthful. So the problem I have is this - I need to store a Date for expiry where only the date part is required and I don't want any timezone conversion. So for example if I have an expiry set to "08 March 2008" I want that value to be returned to any client - no matter what their timezone is. The problem with remoting ...