.net

Will VC++ MFC become obsolete in near future?

Normally people say MFC is little clumsy. It makes UI development slightly difficult to maintain since it has lot of auto generated code. It has good architecture (doc/view) but is not transparent like Win32 programming to understand how window program works in the background. So with this situation, is it good to extend the exposure on ...

How to differentiate public methods and private methods during api testing?

Is it possible to test private methods of a web service, during api testing? If yes, how to differentiate public methods and private methods? I am using the object browser in VSTS to see the list of methods available. ...

2 listbox to exchange value with DBML

Hi, i'have two Listbox. the think is i do the transfert like : click on field in the left listbox, hit "move right" button and it wll display in the right list box.' The other think it's the first Listbox is bind on Dataset and the second on Entity (Linq-to sql). So when i click on the move next i do that : Dim newSite As New List(Of v...

Can multiple threads modify a dictionary?

In C#, can multiple threads read and write to a Dictionary provided each thread only accesses one element in the dictionary and never accesses another? ...

Marshal generic return types for com interop

Is it possible to Marshal a generic return type as non-generic for COM interop? Let's say I have the following class: [ComVisible(true)] public class Foo { public IEnumerable<string> GetStr() // Generic return type { yield break; } } I know that IEnumerable<string> implements IEnumerable. Can I force tlbexp.exe (...

Licenses required for an asp.net web server

What are the licences required for an asp.net (MVC) web application using sql server running a windows server ? Is Windows Web Server 2008 R2 enough for running SQL Server 2008 Web ? Is it possible (legal ?!) to install SQL Server on a "Web" operating system ? What are the limitations ? An official link would be nice ...

How to read raw bytes from an SD card?

On a Windows PC, is there a way to read the raw bytes from an SD card attached trough a USB card reader? The SD card gets written from an embedded system using no file system at all, so I can't use standard file access routines. This is similar to what the unix dd utility does, but I need to integrate this into a .NET application. ...

Problems related to showing MessageBox from non-GUI threads

I'm working on a heavily data-bound Win.Forms application where I've found some strange behavior. The app has separate I/O threads receiving updates through asynchronous web-requests which it then sends to the main/GUI thread for processing and updating of application-wide data-stores (which in turn may be data-bound to various GUI-eleme...

Possible Data Execution Prevention (DEP) problem in Windows 7

I have a serious problem with my .Net program. It calls a native dll, and then crashes instantly because it can't find a native method. This is behaviour we have seen before, whereby the C# compiler, in its infinite wisdom, sets the flag that the program is DEP compatible, even if it calls a native dll which patently is not. We have the...

How to upload files from a VS 2008 C# desktop application to a Windows server 2008/IIS 7

I am wondering what is the best approach/methods/technology to implement a C# desktop application that can upload files to a server? I was thinking of using a HttpWebRequest in the desktop application to send the files and then a webservice to handle the files on the server. I need the server to check for user credentials and I need to...

Will .NET framework 4 change exam 70-536?

Hi, Anyone have any information (including website links) on the syllabus changes (if any) for this exam for .NET 4? I basically want to know if there will be change in the material covered. Update to question: After Steven's excellent observation, let me ask it this way: What will the syllabus of the application foundation exam for...

How to gather information on windows shell programming?

Hi, I am very interested in learning windows shell programming. So...I searched for books on the amazon.com. I see that books on the amazon.com are out of date. Most of books are published before 2005. I googled about it and found many tips and tricks, but not step by step guide. Where do I get started? P.S: I am talking about windows...

How do I get the WinForm Designer to totally ignore a property on a custom control?

This must be a FAQ, but I can’t find a duplicate question! There are lot of different attributes that control what the WinForm Designer does with properties on a custom control, I am never clear on the one I should use in this case. I am looking for: Designer does not show property in grid Designer does not read value of property Des...

XSD data set with Oracle database

Hi folks, I'm having a major issue with an XSD dataset mapping thingy that I'm using within my current project. We are using XSDs for some data abstraction (it's quicker and debatably more maintainable that using Parameterised SQL or a StoredProc), and on my machine (running in the VS development environment) thy're working fine. Howe...

C# writing object to binary file

Hi I have to write an object in to binary file.My struct looks like this. Struct Company { int numberofemployees list of Struct Employee. } Struct Employee { string EmployeeName; string Designation; } What is the best way to do the above operation? Regards Raju ...

A free WYSIWYG control for DotNet

I search a free and easy to drag&drop in my winform WYSIWYG-Control. The background is, I don't have time I can spend on the control, it must be there and ready. DotNet.2 C# NO ASP! WinForm! ...

Work with files exception

I want to create program which will tell me if a file is used or not by another processes (for example i open music or video file in multimedia player, and then i launch my program with this file name programm return "this file is being used", and when no processes uses this file program would say "this file not being used"). What clas...

Writing a Compiler for .net - IL or Bytecode?

I'm currently diving into the inner workings of .net, which means IL. As an exercise, I want to build a brainf..k compiler for .net (yes, they already exist, but as said it's for learning purposes). For the moment I'm just writing some text files that contain .il and compile them with ilasm, which works. But I wonder if I could/should g...

Is this fix to "PostSharp complains about CA1800:DoNotCastUnnecessarily" the best one?

This question is about "is" and "as" in casting and about CA1800 PostSharp rule. I want to know if the solution I thought is the best one possible or if it have any problem that I can't see. I have this code (named OriginaL Code and reduced to the minimum relevant). The function ValidateSubscriptionLicenceProducts try to validate a Sub...

GZipStream or DeflateStream class?

The MSDN documentation tells me the following: The GZipStream class uses the gzip data format, which includes a cyclic redundancy check value for detecting data corruption. The gzip data format uses the same compression algorithm as the DeflateStream class. It seems GZipStream adds some extra data to the output (relative...