I have a VS project used for my .NET WCF host with some simple DTOs in it.
I then have another project targeted for Silverlight with links to the files from the .NET-project.
What's the best way automate the build, so that all files from the .NET project are automatically built to a Silverlight assembly too?
I have tried the following ...
We're serializing/deserializing a class from XML and but there are properties and fields in the class which we want to exclude.
The System.NonSerialized and System.Xml.Serialization.XmlIgnore attributes seem to do the job but what's the difference between them? It seems we can use XmlIgnore on either properties or fields of the class. B...
I'd like to basically control the name of the method that the Visual Studio form designer uses for putting it's generated code in. By default, this is named InitializeComponent. But often times I need to have different layouts for different types of screen resolutions/aspect ratios (see Designing forms to work on different resolutions ...
Below is some linqpad test code. When this runs it errors because the second instance of "item" has a null list of subitems as opposed to an empty list.
I want to treat both situations (null or empty list) in exactly the same way but I wondered if there was a cleaner way than just putting a null check on the list and initialising an emp...
Is there a simple, free way to analyze .Net code (set breakpoint, see stack traces, see running threads) without Visual Studio? Note that I don't need to compile the code, just analyze how it works. I have both source code and binaries but I don't have a Visual Studio license. Unfortunately, the solution file gives several error when ...
I'm trying to develop an app that sends email, and our internal network is locked down pretty tight, so I can't relay using our internal mail servers.
Has anyone ever used something like no-ip.com? Are there any other alternatives?
...
I have a class Cell:
public class Cell
{
public enum cellState
{
WATER,
SCAN,
SHIPUNIT,
SHOT,
HIT
}
public Cell()
{
currentCell = cellState.WATER;
MessageBox.Show(currentCell.ToString());
}
public cellState currentCell { get; set; }
}
I then try to u...
I work in software division of a large bank and we are considering writing our own financial library. However, before we embark in such a project, I want to check that there is no such library on the market.
We would need to have the following feature:
Pricing of derivative products
(options, futures, swaps, etc)
Different financial m...
I'm wondering about people's process when they try to learn about the guts of .NET. Let me give a particular example to clarify.
Recently, we found an error with the StateServer we are using on our .NET website. Sometimes its its starts tossing errors and our site goes crazy. The StackTrace reveals this occurs when:
System.Web.Sess...
I'm trying to have a contextmenustrip object show up on the coordinates that a right click occurs on a particular form object. I hooked into the forms CellMouseClick event and I can receive X,Y values for the event, but they seem to be relative to that particular control. For example, if I use contextmenu.Show(e.X, e.Y), it will show i...
I have a crystal report with a bunch of parameterized fields that are being filled by code and displayed through CRViewer. I need to add a few sections in here to execute a query to return a dataset and display this in the same report. I am not sure if the best way to do this with a subreport. I am trying to add a subreport and then s...
I have tried to implement a multithreaded crawler and it seems to be working in fetching a list or urls concurrently without any issues.
I tested each step and had the program write all html pulled to a text file.
Now the rest of the program intends to take each html stored as a string and parse it for a list of urls from that page and ...
I think it should be a windows service. when given certain conditions it should perform a login into the machine.
The machine will be in the "login screen" checking a webservice to know who is the user and password it should use to login.
Can this be done?, I don't want "automatic login" windows feature.
Thanks!
...
I have a user control that I use in two different places (hence I created a control). Now, this control uses Web Method that I use to clear session from JS. The only problem is that I don't seem to find a way to include ScriptManager inside the ascx itself - only on the pages that host this control, which is prone to error and defeats th...
What actually happens when you target the .NET 3.5 framework in Visual Studio? What does that actually do? Does it somehow "flag" any of the output files and associate them with the framework version?
...
We use a custom session state server on our web site (SessionStateServer). Every once in a while it totally bombs out. We try to redirect to an error page, but the application tries to AquireState, which makes a call to the state server which causes another error. Is there any place in the application or page lifecycle where we could ...
What happens when I save a change to web.config while the application is live? The reason I ask is that I'm working on a site/webapp right now which is built on top of an e-commerce platform. At seemingly random intervals, the site will stop responding. The process for the app pool is normal (no ridiculous memory or CPU usage when this h...
Just wondering if anyone knows how the XmlSerializer determines the order for deserializing any given object's properties.
Added info:
I have a class like this:
private bool _hasGaps = false;
public bool HasGaps
{
get { return _hasGaps; }
set
{
_hasGaps = value;
}
}
priv...
Hey,
i am considering - in order the get a high performance application - to keep a single DataContext in the cache to perform the selects and updates to...
In order the keep the responsetimes low, i'd like to create an asynchronous update like the one i scribbled below:
public void AsyncInsert()
{
DataContext dc = new DataContext()...
This question led me to wonder about thread-local storage in high-level development frameworks like Java and .NET.
Java has a ThreadLocal<T> class (and perhaps other constructs), while .NET has data slots, and soon a ThreadLocal<T> class of its own. (It also has the ThreadStaticAttribute, but I'm particularly interested in thread-local ...