Hi,
nearly every time I use Graphics.DrawRectangle or Graphics.FillRectangle (the int versions) I seem to miss the pixels on the right and bottom border of the rectangle I want to draw.
What is the exact definition of which pixels get filled by
Graphics.FillRectangle(brush,x,y,width,height)
and
Graphics.DrawRectangle(pen,x,y,width,...
I have a certain hirerchy of classes that needs the capeability to copy all public properties from one object to another.
Each class has a certain set of public properties that might differ from any other class.
Example:
class Base
{
// Common properties/methods...
public void Copy<T>(T data) where T : Base
{
// ...
}
...
Dear All,
I have a web application (with C#). I have a GridView and want to be able to sort its contents. I have added the tags
...
AllowSorting="True"
onsorting="MyGridView_Sorting">
and
asp:BoundField DataField="NAME" HeaderText="Name" SortExpression="NAME"
inside the GridView. I have implemented the MyGridView_Sorting method...
Hiya,
I'm implementing a layered supertype that all my entities will be based on. I am currently working on the Equity methods Equals and GetHashCode. I have the following for GetHashCode:
public override int GetHashCode()
{
if (!_hashCode.HasValue)
{
if (this.Id.Equals(default(T)))
{
...
Hi There,
Does anyone know of any library to convert .caf files or .aif audio files to mp3 format.
Im recording these on iPhone using AVAudioRecorder pibrary but need to convert them to mp3 on server side.
Your help is much appreciated.
Really stuck on this one.
...
I would like to start learning DDD. As .net developer, I found 3 interesting books for me.
1) Applying Domain Driven Design and Patterns With Examples in C Sharp and .NET (Jimmy Nilsson)
2) .NET Domain-Driven Design with C#: Problem - Design - Solution (Tim McCarthy)
3) Domain-Driven Design - Tackling Complexity in the Heart of Softwa...
Hi I have a service-proxy with one method:
void SendRequest(MyMessage msg);
The MyMessage is defined as follows:
[MessageContract(IsWrapped=false)]
public class MyMessage{
[MessageBodyMember(Order=0)]
public XmlElement Body;
public MyMessage(XmlElement Body){
this.Body = Body;
}
}
Now, the problem is that w...
Further to my recent questions, I've now closed most of the connections that our web application was leaving open. However, the connection created by the function below remains open. Can anyone identify why it is not closing?
public DataTable GetSubDepartment(int deptId)
{
DataTable dt = new DataTable();
using (SqlConnection ...
I've an application which does
Process.Start()
to start another application 'ABC'. I want to wait till that application ends (process dies) and continue my execution. How can i do it?
There may be multiple instances of the application 'ABC' running at the same time.
Any insights?
...
I have created a partial class for my xsd auto generated class. The problem is in debugging this partial class. Breakpoint are not recognized or the compiler doesn't break at the breakpoints set in the partial class.
// Autogenerated class by xsd.exe
public partial class Class1
{
private Class1Brand[] brandField;
private str...
Hi,
I have a problem which seems very similar to the one described in http://markmail.org/message/6rlrzkgyx3pspmnf which is about the singleton actually creating more than a single instance if you're accessing it using different service types.
I'm using the latest release of Ninject 2 for Compact Framework and the exact issue I'm havin...
When using the WPF Slider, in order to get any kind of discrete functionality, you must set the IsSnapToTickEnabled property to true. However, the value you set for TickFrequency controls not only where the slider snaps, but also where the ticks are drawn. How do I go about snapping to every whole number (i.e. TickFrequency=1) but only h...
Hi folks,
I made a .NET Windows Forms application that I want to deploy using ClickOnce. However, I will need the application to retrieve the query string parameters passed to it.
I found this MSDN article and followed its directions (select the check box labeled Allow URL parameters to be passed to application), but it doesn't appear ...
Whats the difference between http://code.msdn.microsoft.com/WebAppToolkitREST and http://www.asp.net/downloads/starter-kits/wcf-rest?
...
Hello,
I am trying to customize the assembly resolution process by wrapping the AppDomain and its AssemblyResolve event inside a class. The simplified version of my ClassLoader is below. The problem I am having is that when the event AssemblyResolve is fired, it seems that I get a new instance of ClassLoader, not the one I previously c...
I need to hide the main form in order to take a screenshot. I use Form.Hide(), but the method finishes executing while the animation still proceeds (on Windows 7). As a result, the screenshot contains a warped form image instead of no form at all. How to get around this issue? Form.VisibleChanged event has the same effect.
...
Hi,
I read somewhere that EventHandler is a built-in generic type. Why is that so? Could somebody explain me ways to distinguish between generic and non-generic types?
Thanks,
Abhi.
================
I am reading Microsoft .NET Framework Application Development Foundation 2nd edition to prepare for MCTS. In the first chapter, there w...
I have a problem where I have installed a DLL on a server into the GAC.
When I try and uninstall it using the windows installer it still remains in the GAC.
Is there anyway of removing this DLL completely from the GAC safely without affecting parts of the server/system?
...
Can anyone suggest some free .NET library that can be used for conversion HTML to XLIFF and back translated XLIFF to HTML?
...
Hello,
I've encountered a strange problem. I've installed "Visual Studio 2010 ultimate". While installing it showed that it sucessfully installed .NET 4.0. While installing some other softwares. They complain that .NET 2.0 is missing and asking me to install it.
How is it possible? .NET 4.0 must include .NET 2.0 right?
EDIT:
Now, I'm...