.net

Windows Form or WPF, to code or not code

I am planning to develop a UI control suite (open source) on .net because there is hardly such things as free or open source out in the market. But I am not really able to decide the following factors before going into design phase: Should I write it for Winforms only? Should I write it for WPF only? Or, should I write it for both? ...

WCF Store data in memory?

We use dictionary to store the data in memory but the data in memory is increased then exception fire of Fault stage. how to handle this problem. ----------IServices------------ [ServiceContract] public interface IMyService { [OperationContract()] Dictionary<int, Car> getCarList(); } ----------Services------------ public cla...

Extend complex types from an existing schema

I need to extend an existing XML document with new elements without losing the ability to validate it against both the unchanged original schema and an extended schema defined by me. For example, lets say I want to add Code and Price elements to an existing Book document, as follows: <aa:Book xmlns:aa="http://www.aa.com" xmlns...

How do I make SqlServerCe accessible from my C# app?

I was just playing with databases in C# 2010 Express and while typing 'using System.Data.' the auto-complete thing showed me the SqlServerCe in System.Data as an option. Not sure what I did but when I made a new application and added the line 'using System.Data.SqlServerCe;' I got a "SqlServerCe does not exist" error. I tried adding som...

Multiple splitter control

Hello everyone In .NET Framework, there is only SplitContainer which contains 2 panels. I need a container which can contain multiple splitters and panels. See my picture: Please help me. Thanks. ...

How to listen on more than one ports in .Net Socket?

I need the socket listen on all the addresses pointing my machine, i.e. loop back 127.0.0.1, local address 10.86.xxx.xxx. Is it possible? ...

How to transform one C# structure to another like in C++?

Assume that we have two C# structures: [Serializable, StructLayout(LayoutKind.Sequential, Pack = 1)] public struct ByteStructure { public byte byte0; public byte byte1; public byte byte2; public byte byte3; public byte byte4; public byte byte5; public byte byte6; ...

Raise custom event in multi-project

Hi all, it concerns following: I have two projects which should exists more or less independently from each other. Project one is a kind File System Watcher. The other one cosnists of my UI. The file watcher raises an event, if there is a new file. After that, the data from the file should be added to a database. That's coarsely the back...

wcf forces chars escaping in response

Hi, All I want to return unescaped html in the WCF response, therefore I need CDATA section to be included in the response all the time. I realized I have no chance with DataContractSerializer. So I have tried to mark my operation with [XmlSerializerFormat] and implement IXmlSerializable in the response class. I see that my serializ...

TimerCallback Delegate to drive an STA model .NET library component

I'm trying to use the TimerCallback Delegate mechanism to drive instances of objects from a 3rd party .NET library component on separate threads executing on a timed basis. When I try to create an instance of an object from the library I an exception is raised: (object name) can only be called from a single-threaded apartment (STA...

Replication/Synchronization Library for Occasionally Connected Systems

here is the situation I have a .Net desktop application which stores it's data on local file system (using sqllite). And there is the master database on a remote server which. The desktop application needs to synchronize data to the master database when ever there is a dial up connection to a specif server or when ever there is an intern...

c# : print Charts with DXperience

How I can print or export to PDF many charts in one page with Devexpress. Thanks. ...

how to get the days for particular month and year

I have a method which passes two parameters Month and year i will call this Method like this : MonthDates(January,2010) public static string MonthDates(string MonthName,string YearName) { return days; } How to get the days for particular month and year? ...

Do empty delegates not get invoked?

Hi, In .NET, when you have a delegate that only has an empty method subscribed to it, does the .NET VM realize this and skip even calling it? I'm asking because I noticed that the invocation count is set to 2 when you subscribe once but when you unsubscribe it, the value goes down to 0 (not 1). Thanks in advance. Daisuke ...

Maximize form on both screens (dual screen monitor)

Hi! Iam looking for some hint or solution regarding following problem. I have a .NET 2.0 WinForm dialog which operates in Dual Screen environment. The Working area is set by .NET Framework to reflect the Primary screen. I want to MAXIMIZE Form to BOTH screens but after clicking the "maximize button", dialog is maximized only to "active"...

Rhino Mocks 3.5 failing in TFS integration build while running test lists

Build server: TFS 2008, W2003 Error message: System.IO.FileLoadException: Could not load file or assembly 'Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f' or one of its dependencies. Access is denied.. This happens only aprox. last 2 weeks. Same tests were successful before and still are when runn...

How do I get the number of days in a particular month and year?

Possible Duplicate: how to get the days for particular month and year Given the following method: GetDaysPerMonth(string monthName, string year); And the values "1" and "2010", how can I return the number of days within the specified month? ...

odbc exception error code

i want to know the equivalent error code in odbc exception for sqlexception error code 53 and 2 ...

ASP.NET / .net newbie question - Java Hotspot equivalent?

Hi, I'm an experienced java dev who is starting to learn the .net side of things, and was going to pick up a asp.net project as my area to begin(so I can compare to grails, spring mvc etc) One thing I am finding v annoything is having to restart my web server for each code change. On the java side during development, I use standard JV...

Should a .Net beginner bother with ORM or wait until he gets more experience?

Hello, I am relatively new to .Net and the database side of it in particular. I'm planning to rewrite some legacy VB6 applications here using .Net and C# with Visual Studio 2008. I've studied things like strongly typed datasets, Table Adapters, etc. It works quite well but I find strongly typed datasets to not be perfectly manageable,...