.net

WPF datapicker is very small for touch apps

Hello, I'm developing an application that is going to be used in touch screen. The problem is that the date picker is very small. Therefore, how can we make it bigger ? Regards, ...

.Net Binary Deserialization Failure detection/forensics for runtime platform

I'm looking for insight on how to instrument a runtime platform to expose the source type of a Microsoft .Net binary deserialization failure. When using BinaryFormatter.Deserialize(StreamingContextStates.CrossMachine) and one of the types does not exist in the current binaries; instead of throwing an error, .Net inserts the object [Type...

Allowable maximum size of data that goes along with output files in setup project for a windows form application using Visual Studio

I am working on a windows form application using C# and have about 5 -10gb SWF files that are tied in to my windows form application. When I try to build these files along with the project output in setup project, Visual Studio Team system throws me an error "Not enough memory storage available". I am running this on a 32bit OS with 2 g...

.NET - Using WebClient.Download File in a One-Way WebService

I have a simple one-way web service in my C# .NET web application. I need to download an image from a given URL and save it to my server. However, every OTHER time I call the service it works perfectly. The other times I get a "Thread was being aborted" exception on the webClient.DownloadFile line. I've read that WebClient uses httpWe...

Unit testing WaitHandler.WaitAll

Is there a way to unit test WaitHandle.WaitAll() when using Visual Studio's built-in unit testing solution. When I try and run a test that uses this function within Visual Studio the test fails and when examining the test results the following error is displayed: WaitAll for multiple handles on a STA thread is not supported I'd like...

Linq to NHibernate repository implementation details

I'd like to have the following API for my MyTypeRepository: var myChosenInstance = _myRepository.FindOne(x => x.MyProperty == "MyValue"); ..and for the lambda to use used to construct a linq query within the repository, which is then used by Linq to NHibernate. Is this possible? What would my repository FindOne method look like? ...

update daily ==> Clickonce or UAB(update application Block)

Hi for updating an application daily which one is better for a WPF application? clickonce or UAB? or more options? thanks of your attentions :) ...

How to execute a method when a test fails

I am unit-testing a a .NET project using visual studio's own framework where each test needs to close certain connections so that the next test may run correctly. However, when a test fails, this cleanup is not performed, and as a result all subsequent tests fail. Is there a way I can execute a method everytime a test fails? ...

Do I need to close a .net service reference client when I'm done using it.

I'm trying to find out if it is neccessary to close a .net service reference client when you are done using it. Almost all of the examples that I have come across on the net don't seem to, but the client that is generated implements IDisposable and since it does open a connection to a service, my intuition tells me you need to close tha...

Expose a repository as an IQueryable

I'd like to expose a Repository as an 'IQueryable' type. The repository uses Linq to NHibernate to communicate with the database. Can anyone point me at an example implementation? For example, what would the corresponding 'GetEnumerator()' implementation on my repository look like? Edit: Would something like this be appropriate? pu...

Modify Object Access properties via C#

After viewing my Security Event logs on Server 2003 I have noticed that an event is logged with a failure audit. The category is Object Access, with the following Accesses being required: READ_CONTROL SYNCHRONIZE ReadData (or ListDirectory) WriteData (or AddFile) AppendData (or AddSubDirectory or CreatePipeInstance) I ...

how to create a hierarchical datastructure just like xml using .net?

hi, i want to crate a hierarchical data structure same as XML, means parent, child, sub child... like that one using vb.net. so ho can i create that one? ...

How to get system properties on a webpage?

I am working on a website in asp.net. I need system properties like RAM, Processor, Hard-drive etc on a web page. How to get it? ...

SSE2 instruction support with /CLR switch.

Why isn't the SSE2 enhanced instruction set optimization available for C++ programs compiled with the /clr switch? ...

How can i add list<myclass> data into sqldatabase?

i try to add data with ExecuteCommand. everything is ok if list<string> data. i converted string type list into arraylist to add sql. But <MyClass> there are rows and column. look below picture. public class MyTally : ISave { public List<ENG_MPD> engMpdIntersectList { get; set; } private ArrayList engMyTallyList; ...

Visual Studio 2010 is Eating My DLLs! - referenced third party dlls missing after build

Please help I am pulling my hair out over this: I have a Visual Studio ASP.NET MVC solution in which a project references a third party DLL, log4net in this case. My solution tree is as follows: GenericLibrary MyApp.NHibernate MyApp.Library MyApp.WebUI MyApp.WebUI is the main start-up MVC web project and has references to GenericLib...

Error in generic repository method for Entity Framework

I'm trying to create a generic method to use in my base class for my repositories and I'm having an issue. Here's the method... public virtual T First(System.Linq.Expressions.Expression<Func<T, bool>> where, List<string> properties) { IQueryable<T> query = null; if (where != null) { query ...

Root Element Missing - Creating Xmldocument using XmlTextWriter

Hello I'm having the following code which is spitting 'Root Element Missing' during doc.Load(). MemoryStream stream = new MemoryStream(); XmlTextWriter xmlWriter = new XmlTextWriter(stream, Encoding.UTF8); xmlWriter.Formatting = System.Xml.Formatting.Indented; xmlWriter.WriteStartDocument(); xmlWriter.WriteStartElement("Root"); XmlDocu...

Open source backgammon in VB.NET/C#/WPF

I'm looking for sample source for backgammon in VB.NET or C#, preferably using WPF. What existing open source projects implement backgammon? ...

How do I use MethodInvoker in C++ ?

I've got a C++/CLI application which has a background thread. Every so often I'd like it to post it's results to the main GUI. I've read elsewhere on SO that MethodInvoker could work for this, but I'm struggling to convert the syntax from C# to C++: void UpdateProcessorTemperatures(array<float>^ temperatures) { MethodInv...