How can we implement observer pattern in .NET?
In .NET architecture,there are lot of design patterns.I want to know about what is meant with observer pattern and how it is implemented ...
In .NET architecture,there are lot of design patterns.I want to know about what is meant with observer pattern and how it is implemented ...
I have three different configurations on my project, all three do not require all files to be build into the application. Actually I'd prefer if I could exclude those files from the build, which would make my application a little more lightweight. What I'm looking for is #if MYCONFIG or #if DEBUG statement but for files. I've already re...
I have a List of User objects from my data store. Now once it is already in memory the only way to get a user by his ID is to use the Single extension method. This is really performance degrading. I know I could have used a dictionary instead of a list but this would be redundant. I would have to store the Primary Key 2 times. So is t...
I was trying a run a .net socket server code on Win7-64bit machine . I keep getting the following error: System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used. Error Code: 10047 The code snippet is : IPAddress ipAddress = Dns.GetHostEntry("localhost").AddressList[0]; IPEndPoint ...
Is it possible to create a method like BitConverter.GetBytes() that accepts as input also a parameter of type Object, without using Marshaling as done here? Or the only solution, if a type Object is given as input, is to implement a case on all available .NET value types? ...
What is the difference between Web Farms and Web Gardens, related to the server configuration section in .NET? How can we implement it? ...
How can I find of all the browsers and their details that are installed on a machine. ...
I use a virtual PC (with remote desktop connection) for my project. The project uses some GDI+ functionality. Now, apparently there is a problem when displaying graphics object on the real and virtual PC. A simple example: public class Form1 : Form { private void Form1_Paint(System.Object sender, S...
I want to get a list of all available datasets (that I'd creat in my Asp.net project) After that I want to select a Dataet from the list and get The list of Available DataTable included in that Dataset. Finally I should b able to check all Data Tables Fields How To Do This ? Note that I know VS already has a dataset Panel but that...
I know that the SOAP Header is used to transmit auxiliary information relevant to the Web Service processing that isn't part of the method signature.I want to know how to encrypt SOAP message header. ...
Since I started to develop in a test/behavior driven style, I appreciated the ability to mock out every dependency. Since mocking frameworks like Moq work best when told to mock an interface, I now implement an interface for almost every class I create b/c most likely I will have to mock it out in a test eventually. Well, and programmin...
Hello to all, I want to display value of "text" property of checkbox when it is clicked. So with checkedChanged event 2 arguments of type sender & eventArgs are passed. So can anybody get me know how to do the same using these arguments. ...
I'm asking this out of curiosity rather than due to a real need to know, but I can't think of any good reasons for MethodInfo.Invoke to wrap its exceptions. Were it to let them pass unwrapped, debugging such exceptions in Visual Studio would be a tiny bit easier - I wouldn't have to ask VS to stop on first-chance exceptions to see the c...
I want to change master page some label value from child page. ...
Hi How i can convert to c# code files to html files?Is there any generation tool? I need it my presentation... ...
I have a Person and an Organisation Entity: Person looks like this: public class PersonEntity { public string FirstName {get;set;} public string LastName {get;set;} public bool IsValid(PersonEnum Attribute, string AttributeValue) { if(attribute == PersonEnum.FirstName && AttributeValue == null) return false; if(attribute == PersonEnum....
I'm looking for information on how to use MySQL geometry types in .NET. I'm using Sub-sonic for ORM, and don't really need to support much more than MySQL's POINT type. The MySQL .NET connector seems to return point data as a byte[] array in OpenGIS WKB format. What libraries are recommended for working with this WKB format? Alte...
Hi, I have a method written in VB.NET. It looks like this: Shared Sub SomeMethod(ByVal Id As Guid, Optional ByVal str1 As String = "foo", Optional ByVal str2 As String = "") I want to call this method from C# 3.0 and I want it to use its default arguments. I tried passing System.Reflectio...
Hello, I'm trying to load the XHTML schemas from the W3C site (xhtml - transitional, strict & frameset) which I'm having to put into to an XmlSchemaSet. This is then used by a third party product in our application to show intelisense and validation. However when I try and "Compile" this XmlSchema set I get the following message: Th...
I want to change screen resolution with c# code in desktop application. ...