list vclAsset<FullAsset>
list callsigns<string>
foreach(FullAsset fa in vclAsset)
{
if (callsigns.contains(fa.asset.callsign))
{
//do something
}
}
Is there a more elegant way to do the above? A FullAsset object contains an Asset object which in turn has a string "Callsign." Each callsign will be unique, so my li...
I'm trying to make a vista minesweeper clone. Right now my uncover algorithm is the cascade algorithm. It kind of looks like a square that gets bigger and bigger. I noticed in vista mnesweeper, when its gameover, it iterates through the game in a circular manner to uncover the mines. Does anyone know what this algorithm is called? Thank...
For a "log information for support" type of function I'd like to enumerate and dump active thread information.
I'm well aware of the fact that race conditions can make this information semi-inaccurate, but I'd like to try to get the best possible result, even if it isn't 100% accurate.
I looked at Process.Threads, but it returns Proces...
I want to autofit columns to the content in cells. Also i want to add my headers to columns. Is there a way to achieve autosize?(i saw that column headers can be set with DataGridTableStyle)
...
My DotNET application allows for plug-in dlls by 3rd party developers. I'd like to facilitate the process of making these plug-ins by offering a set of tools that create empty projects and new standard classes. Essentially, I need to create a typical ClassLibrary project with a bunch of dll references and some PostBuild Events. Also, it ...
I am converting a remoting interface to WCF, however I have a method that is declared to return "object" and can return a number of different types (mostly different enums)
Where can I find an example of coping with this?
(I am using a shared contract assembly that contains all the types rather than generating a client proxy if that m...
I want to take advantage of the new Windows 7 taskbar functionality in a .NET application and would like to know what people think is the best way to check for Windows 7 features in .NET. My aim is to have distinct code for Windows XP and Windows 7.
I'm not overally keen on:
just wrapping the Windows 7 code in a try catch
if OS = ...
I wrote a WCF service, but the data stored in the Service implementation doesn't persists between calls, not even if stored in a static variable. What can I do?
The service implementation is as follows:
public class Storage : IStorage
{
protected static object[] _data;
#region IStorage Members
public void Insert(object[] ...
I have created a control and added a TextBox inside that control,
I am attaching that control to a .aspx page via
<%@ Register Src="../UserControls/AccountSearchControl.ascx" TagName="SearchControl"
TagPrefix="csr" %>
and
<csr:SearchControl ID="AccountSearchControlBox" runat="server" OnSearchButtonClick="RetreiveAccounts" />
On ....
I know the following is possible with linq2db4o
from Apple a in db
where a.Color.Equals(Colors.Green)
select a
What I need however is something that allows me to build my query conditionally (like I can in other linq variants)
public IEnumerable<Apple> SearchApples (AppleSearchbag bag){
var q = db.Apples;
if(bag.Color != null...
I have an aspx web page (opener) which opens a popup window
In the popup window I need to retrieve the value of a hidden field which exists in the opener page.
So this is all straight forward using Javascript.
However, here’s the problem, I need the value of the hidden field to be processed SERVER side before the pop up page loads
(B...
How can I get the current CLR Runtime version in a running .NET program ?
...
I have to abandon using PostSharp, because it won't work with obfuscated/merged assemblies. At least, I don't see any way to get it working (it crashes on app start, when assemblies are obfuscated)
I need to intercept some methods in my app (call special code instead of original methods - OnMethodInvocationAspect)
Any advice?
...
I am using a SaveFileDialog and have to set long string(longFileName) in FileName. String longFileName is known at Runtime.
If I set
saveFileDialog.FileName = longFileName ;
then I get System.IO.PathTooLongException.
How can I do it?
...
I just finished debugging a problem, where our program crashed on a production server, but never on development machines.
I have made this small program, which I could reproduce the issue with:
using System;
using System.Collections.Generic;
using System.Linq;
namespace RunTimeBug
{
class Program
{
static void Main(st...
I know the basic difference as ReleaseComObject only decreases some counter by one and FinalReleaseComObject decreases it to zero.
So what I usually hear is, call FinalReleaseComObject because then you are sure that the COM object is really released.
But this makes me wonder, there is a point to this counter right? Aren't you breakin...
I have a bunch of messages in one of the queues from an old date. I would like to take a backup before purging them. Any thoughts?
Schar
...
Are there limits/differences when performing GDI operations on off-screen objects like paths/regions as compared to performing the same operations on the display?
What limits can I expect when performing graphics operations on a region/path as opposed to performing them directly on the display?
When performing GDI operations on GDI reg...
Let's assume we have the following class:
public class tx_fct
{
int _ok;
public int ok
{
get
{
return _ok;
}
set
{
_ok = value;
}
}
}
How can I override the getter using reflection?
The getter doesn't seem to be in tx_fct1.ok.GetType().GetMeth...
I would like to create a Screencast that can be played by a Silverlight player or embedded in a Silverlight application. What program can I use to create the screen cast and how do I use the output with Silverlight?
...