.net

What design patterns are implemented in the .net framework?

What classes in the .net framework implement the various design patterns like decorator,factory etc? ...

C#.Net Windows application - Getting Logged user name in My NT

I need to get the username who logged in particular machine in my LAN. Suggest me a best method to get the user name by passing machine name in C#.net windows application. Also consider the permission. Thanks ...

Why does GetMachineStoreForAssembly() use different directories sometimes?

I've got an assembly in my framework, the purpose of which is to manage some data common to several applications that I am building. The assembly uses isolated storage to persist the data. The assembly itself happens to be a command-line .exe application and it can be executed directly as a tool to examine and make changes to the data....

how to achieve/mimic asp .net button postback behaviour using a normal html button, image or anything clickable?

Hi all! Here i m once again here to seek your help :) Now i have a problem where an asp .net button/image button is not doing the postback! The problem at hand is in this page: http://www.datespeed.net/ Here i have a gray themes panel. Where there is a themes dropdown and an asp .net image button called apply. Now the dropdown is doi...

Porting C++ code to Silverlight

I have C++ application which has UI developed using MFC, does some networking using sockets (using boost libraries) and some image processing. I want to move this application into Silvelight framework (I can use 4.0 if required) so that it can be used over the internet easily. Here I want to move all parts (UI + networking etc) in to C# ...

Model Based Testing Tutorial with C# / .NET

Is there any C# .NET resource from where I can learn about how to write Model Based Tests ? using NModel or preferrably Spec Explorer ? just some basic tutorials on how to write MBT ? thanks ...

.NET 3.0 or later Socket Bible

Hi, is there a Bible for Sockets programming in .NET that utilizes the 3.0 or later framework? An example of the caliber that I am looking for should be on the level of Concurrent Programming on Windows by Joe Duffy if this were a .NET threading and concurrency question. C# is my prefered source code book samples but any language on th...

Generate Multiple methods using Reflection

Hi, I would like to know how I can generate multiple type methods using Reflection. Example : class A() { public void CoreMethod1() { } public void CoreMethod2() { } // .. 20 such core methods public void Method1() { //some initializations //call to CoreMethod1(); } public void Method2() { //some initialization...

How to implement web-based installer?

Guys how can I implement a web installer for my application? ...

How do I detect non-printable characters in .NET?

I'm just wondering if there is a method in .NET 2.0 that checks whether a character is printable or not – something like isprint(int) from standard C. I found Char.IsControl(Char). Could that be used for this purpose? ...

How to parse back the result of string.Format

Let's say I have a number (e.g. double) and transform it using some format string into a string variable : var str = string.Format("{0:0%}", 0.256); (the content of the str variable is in this case "26%"). Is there any way to parse this string back into the number ? I'm aware that depending on the format string the lossless conversi...

why Object.GetType() is not virtual?

code sample taken from MSDN public class Test { public static void Main() { MyBaseClass myBase = new MyBaseClass(); MyDerivedClass myDerived = new MyDerivedClass(); object o = myDerived; MyBaseClass b = myDerived; Console.WriteLine("mybase: Type is {0}", myBase.GetType()); Console.WriteLine("myDerived: Type is {0}", myDeriv...

Target .Net 3.5 in VS2010 for C++ executables

Is it possible in VS2010 to create a mixed mode executable that targets .Net 3.5? If we try this we get error MSB8009: .NET Framework 2.0/3.0/3.5 target the v90 platform toolset. Please make sure that Visual Studio 2008 is installed on the machine. If we then change the toolset in the properties to v100, then the resulting executable s...

Switch from C# to Java, which "gotchas" I should care?

I'll maybe have to switch to Java for new project. I have very few experiences about Java, because I've mainly studied and used C#, and I'm afraid of the differences between these two language/platform should likely to cause me many problems. Which are pitfalls/gotchas I should care about? ...

Use of Stored procedure

Why to use stored procedure in .net and how to use it? ...

Check .NET 4 Full Framework is installed

If the .NET 4 Framework is not installed, the application bring a message, but if only the client framework is installed and the application need the Full Framework, nothing happend and the application starts. Is there a way to check if .NET 4 Full Framework is installed on the target system and not only the Client Framework? I search ...

WCF: wrapping legacy API question

I have to wrap legacy .net assembly API (set of classes and interfaces) with WCF service. Service is visioned as proxy that delegates calls to existing classes with virtually no additional work. So I addded [ServiceContract] interface that exposes methods that deals with existing structures and classes. But wcf-proxy-generator (svcutil...

Spec Explorer for beginners

where can I find a good tutorial for Spec Explorer (beginner) ? ...

Will GC release used memory

I have a parent object that has a reference to a child object and additionally the parent has an event handler that listens to an event of the child object. If all references to the parent object will be released, will the memory used through the parent and the child be freed through GC? (Assuming that no more references neither to the ...

Windows Mobile autoscroll doesn't work

I have a long text inside a Label in a panel (Windows Mobile 6.5). I set the panel's autoscroll property to true and see the scroll bar but it doesn't work, I can't scroll it. How can I solve this problem? ...