I have an application written in C# targeting .NET Compact Framework 3.5, running on Windows CE. From time to time, operations lasting for a second or so are being performed on the UI thread. I currently set the Cursor.Current property to indicate that the application is busy, but this does not prevent mouse events from eager users to qu...
I have made a code review for a .NET project (VS2008/.NET 3.5). I noticed that many business entitities and data access components were created from scratch while not having a business demand for implementing complex rocket-science code.
Many review-issues were related to the data access layer.
Looking at the architecture that is used ...
Referring to my question on filtering ('constraining') types in a foreach loop, I am trying the first method in Charlie Flowers's answer, using the .Where method on the collection, but the compiler can't find .Where on the System.Web.UI.ControlCollection class. This is derived from IEnumerable, so what's the problem here?
foreach (var ...
We have a custom built WPF CRM and are looking to integrate a soft phone client so that operators don't have to manually enter phone numbers. From what I can see on the web there are no WPF soft phone clients and it looks like we'll have to build our own from scratch.
Does anyone know of any WPF soft phone implementations out there? I ...
Hi
I am using a datagrid in window application c#.net.
I want to display a text as bold dynamically.
Using the below code i am getting the error font.bold is only read only.
Datagrid.Rows[0].Cells[0].Style.Font.Bold = true;
Is there anyother way displaying a text dynamically in a datagrid ?
...
Is there a way of searching a list for more that one consecutive values? I've looking at Find and IndexOf but Find uses Predicates that only use the current value and IndexOf only takes byte parameters.
I can code my own solution but I want to be sure that there isn't a solution already available to this common problem.
Thanks in advan...
Hi.
Please can anyone recommend a quick checklist / best practice guide to help us avoid simple (but subtle) mistakes that cause could cause memory leaks in .net apps
I find it difficult and quite painful to begin searching for the cause of a memory leakage when i'm in the testing phase of a project.
If there are 'rules of thumb' to c...
I have a legacy system that dynamically augments a table with additional columns when needed. Now I would like to access said table via C#/NHibernate.
There is no way to change the behaviour of the legacy system and I dynamically need to work with the data in the additional columns. Therefore dynamic-component mapping is not an option si...
A lot of questions are being answered on stackoverflow, with members specifying how to solve these real world/time problems using lambda expressions.
Are we overusing it, are we considering the performance impact of using lambda expressions?
I found few articles that explores the performance impact of lambda vs anonymous delegates vs ...
i want to do above.
i have an object of table in c#.
...
When im naming a variable for a directory should i end the variable name with path, folder or directory.
Im writing my code in .net..
...
I'm launching an external process with System.Diagnostics.Process. This is part of a batch job, so if one process crashes, I'd like to handle it and let the rest continue.
What currently happens is Windows pops up a dialog telling me that the program has crashed, and only once I've dismissed that manually does the process exit.
Accordi...
I prepare currently for my MCTS and learned something about the function of EncoderReplacementFallback and DecoderReplacementFallback. I understand the functionality, but i'm not able to identify a real world scenario, where someone would use this!
Do you know one?
...
What is the most efficient way of calling some business logic from javascript on the client side using AJAX? It looks like you can call a [WebMethod] on an aspx directly from javascript (in my case I'm using JQuery to help out) OR you can call a .asmx directly. Which call incurs less overhead? What is the best practice?
Also, what does ...
Is there a tool for filling a System.Data.Dataset with test data?
...
Hi
I have developed a winform application in 1280 X 1024 pixels.....when using the same screen resolution
it shown exactly...But i change my screen resolution to 800 X 600 pixels it shows screen with close button out of screen.
How to fix this...is there is any restriction to build an application using a particular screen resolution ba...
My scenario - I am trying to send a Assembly File from Server to Client (via direct TCP connection). But the major problem is- how do I convert this Assembly to bytes to that it can be readily transferred?
I used following -
byte[] dllAsArray;
using (MemoryStream stream = new MemoryStream())
{
BinaryFormatt...
I'd like to implement an interface that resides in an external assembly. However that particular interface has been marked as "internal". Is there a way I can still implement this interface for my own classes?
I know how to call private/internal methods using reflection in C#, so I guess reflection should be used in this case too. Howev...
I have a class that I want to have access to my IOC container (Windsor), however I don't want to keep a static IWindsorContainer property hanging around - I would prefer to have the container inject itself into any classes that require an IWindsorContainer as a constructor dependency.
I've pulled this off with Unity, but when I try the ...
Given the following example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
namespace SerializationTest
{
[Serializable]
class Foo : Dictionary<int, string>
{
}
class Program
{
static void Main(...