I've noticed a common pattern in some code I'm writing so I decided to extract it into a class. However, since starting to use this class I've been having a problem where every once in a while the program will hang indefinitely, and, from what I can tell from debugging, this class seems to be the cause. Could sometime tell me what I'm ...
I usually write the following to handle a right mouse click.
if (e.Button == MouseButtons.Right)
{
}
But, I have seen people do it this way. Can somebody tell me why they do it this way? What's the advantage?
if ((e.Button & MouseButtons.Right) == MouseButtons.Right)
{
}
...
I want to write an dynamic linq where i send table and column name this query return me the max row number of the table .
SELECT ISNULL(MAX(intProductCode) + 1, 1) AS intProductCode FROM tblProductInfo
Above is my T-SQL syntax.I want same output from the linq how to
If i write this bellow syntax get same out put but here i can not se...
I have multiple large objects which each have about 60 strings. I have to trim all those strings, and I'd like to do so without having to go this.mystring = this.mystring.Trim(). Instead, I'm looking for a way to automatically have each object discover its own strings and then perform the operation.
I know a little bit about reflection,...
Hi, I am trying to create a backend of my language for .NET platform.
The front-end and interpreter written in Delphi.
Unmanaged API just allows type definitions but no emiting of MSIL.
What ways exist to generate MSIL from unmanaged code?
Without using Reflection.Emit and using ILasm to attain this?
Thank you.
...
If I create a binding to the IsReadOnly property of the DataGridTextColumn, it does not actualize. If I set it through markup, it works.
<DataGridTextColumn IsReadOnly="{Binding IsReferenceInactive}"/> <!-- NOP -->
<DataGridTextColumn IsReadOnly="True"/> <!-- Works as expected, cell is r/o -->
The IsReferenceInactive property is a ...
I want to do the same thing as in this link:
http://www.codeproject.com/KB/WCF/Custom_Authorization_WCF.aspx
But without using configuration files. Can anyone show me how?
Edit: I want to implement both AuthorizationPolicy and the CustomValidator.
...
Hello,
I have declared an interface in C++/CLI and made it assembly(DLL). Now I want that interface to be implement by C# app. I have added the reference but still my C# assembly does not detecting my C++/CLI interface and says "Could not found: Are you missing some assembly refernce......"
How to solve this issue?
Regards
Usman
...
Hey all,
I would like to use db4o as the backend of a custom cache implementation. Normally my program involves loading into memory some 40,000,000 objects and working on them simultaneously. Obviously this requires a lot of memory and I thought of perhaps persisting some of the objects (those not in a cache) to a db4o database. My p...
Hello,
While looking for something totally different the other day, I have stumbled upon two libraries for doing Fluent Validation in .NET.
The concept seems interesting since so far I am doing my validations using the usual conditional and branching statements (if, else, case, etc).
In particularly, it makes relatively easy to chain s...
so in dll we have x264_param_t structure\object and a function for its setting up x264_param_apply_profile. in C we use such code to set it up
x264_param_t param;
x264_param_default_preset(¶m, "veryfast", "zerolatency");
param.i_threads = 1;
param.i_width = width;
param.i_height = height;
param.i_fps_num = fps;
param.i_fps_den = 1;...
I'm working with NSB (latest version), got to the stage where I configure it correctly and manage to publish messages onto the bus. Only problem is - I'm not getting any of them in my message queues. The event log is clean - nothing to help me diagnose the error.
Help greatly appreciated!
...
Assuming I have the following schema
table A:
ID int primary key
value varchar(255) not null
table B:
ID int primary key
AID foreign key refences A (ID)
name varchar(40) not null
now when I execute the following subsonic linq
var items =
from a in A.All()
where any-condition select a;
all is fine.
the killer is when I do the fo...
I'm building an application which needs to filter some mouse clicks system-wide. That is, I need to make the system ignore some mouse button clicks at special occasions.
I use low level mouse hook and SetWindowsHookEx to filter out these clicks. It works relatively well, except for WPF applications. I guess that's because these applicat...
I have this kind of code:
public class Foo
{
public SomeHandler OnBar;
public virtual void Bar()
{
}
}
Foo is a base class and therefor other classes might inherit from it.
I would like the OnBar event to always be fired when Bar() is called even if it's not called explicitly inside Bar.
How can it be done?
...
Hello everyone,
I am using ASP.Net + .Net 3.5 + VSTS 2008 + IIS 7.0 + C# to develop a web application. I am creating a very simple web application, and I just modified page_load, Session_Start and Session_End. Here are my code, my question is I find session ends message is written to file immediately after session start message. My test...
Hi
I am developing a game with WPF technology.
I want to add new Features to game every third days .
the size of update is important for me.
my game needs to internet for start. like an online game.
another challenge is size of updates.
the most important note :
I need to update of the program does not needing stop.
what is your suggest...
Hi, at the moment I'm using a List<short> as a buffer to hold things for a while while a calculation is made to each value based on other values further down the buffer. I then realised that this probably wasn't very effecient as I have been told that List<> is a linked list so every time I do whatever = myList[100]; the poor thing is ha...
In my company we use IBM filenet and I wrote my own Linq To FileNet provider that I access through WCF data services. Everything runs fine until it fails on some computers, all computers are in same domain but they have different security polices - maybe this is the problem.
The problem is very strange because the Silverlight gives the ...
I have designed a user control to present a list of questions to the user. This "question list" control just contains a repeater. There are a wide range of types of question and form fields that must be used to answer the question, so they are implemented as a range of "question input" controls which are dynamically loaded into the ItemT...