There are some threads on Stack Overflow dealing with implementing priority queues in .Net and C#.
My issue is of a more basic nature: Why isn't there a priority queue out of the box in the .Net framework? Even the C++ Standard Library has one.
...
I am using the nettcpbinding binding (with reliably messaging at present).
When the server does a serviceHost.Close(), the TCP connection should be cleanly closed and therefore the client side should be told. How do I hook this event with WCF? (Note this is not the same as the TCP connection being closed by a network problem, when re...
Hello All
How can i get my machine timezoneinfo dynamically? right now i am doing it by hard code timezone.
string indTimeZoneKey = "**India Standard Time**";
TimeZoneInfo indTimeZone = TimeZoneInfo.FindSystemTimeZoneById(indTimeZoneKey);
...
In my web app (asp.net C#) I have menus as "All", "Education", "Fun", "Comedy". I want when I select All then it should be displayed as current menu, for which I have a CSS class current.
In case of WebUserControls I can do it easily by passing parameter of current page to select as below:
mywebpage.aspx
<uc:header ID="header1" runat=...
In writing some threaded code, I've been using the ReaderWriterLockSlim class to handle synchronized access to variables. Doing this, I noticed I was always writing try-finally blocks, the same for each method and property.
Seeing an opportunity to avoid repeating myself and encapsulate this behaviour I built a class, ReaderWriterLockSe...
The original question:
The title of this question might be a bit clumsily phrased, but here's the situation:
I have a .NET web project deployed on my server. It's still in beta, so there's a lot of releasing and re-releasing happening.
I have also written a C# executable in the same VS solution (call it "admin.exe") that runs in th...
I have searched around but have been unable to find out the recommended pattern for generic exception handling when using a control such as the wpf toolkit datagrid.
As an example, at the moment I am getting unhandled exceptions caught by my shell application. This happens when a user clicks on a column header to sort it, and it is unab...
Hi there,
I've just found out little oddity in behaviour of James Newton-King's library JSON.NET. I'm using it for deserialization of client side JSON custom "features", and everything works - even validity test. Until client sends another type of "feature":
CustomJSONConverter converter=new CustomJSONConverter();
MyJSONFeature jsonFea...
I am using Entity Framework to do the ORM in .NET project. The problem I am facing is that when the database schema changes, there is no proper mechanism to update the edmx file.
For example, If there is a column called "Salary", and I change it to "EmpSalary", then when I update the edmx from visual studio and it shows me two columns ...
Hi there
I'm trying to find a solid licensing scheme using Microsoft's LicenseProvider. My thought is to use asynchronous encryption by ways of RSA (RSACryptoServiceProvider with 2048bit keys).
I found this to be pretty easy, but I am unsure how secure the mechanism really is. This isn't for fun and needs to copy-protect a number of pro...
I know I can expose multiple netTcpBinding endpoints in the same port.
I know I can't expose an endpoint in the same port used by IIS.
What about multiple webHttpBinding endpoints in the same port?
...
Hello,
why the next example throws a System.ArrayTypeMismatchException?
New Int16(){4,5,6}.Cast(of UInt16).ToArray()
I expected that this line returned a UInt16 array containing 4,5 and 6.
Thanks in advance.
...
Hi all,
Am trying to play audio from resource using Dot.net CF, I added an audio file for the resource Property in my application, and am try to using below sample resource file reference code for..
SoundPlayer player = new SoundPlayer(Assembly.GetExecutingAssembly().
GetManifestResourceStream("blessedwav.wav"));
player.Play();
B...
hi guys,
We have 3 software products which use the same .net dlls(code + legacy).
All these use common functionality present across 3/4 dlls.
i wanted to know how and where to deploy these dlls.
And which is the most standard way of doing this.
S1] Along with each product in its install dir -- probably easiest way to do.
(but if any...
Hi,
I want to serialize an object. I've got this basic class structure:
class Controller
{
Clock clock;
public event EventHandler<ClockChangedEventArgs> ClockChanged;
public void serializeProperties()
{
using (FileStream stream = new FileStream(PROPERTIES_FILE, FileMode.Append, FileAccess....
I want to create a WCF service that accepts an XML message that interoperates with a non MS consumer. Now, I could expose a method that accepts a string and then handle the XML from that point onwards. Is there a better approach than using a string parameter?
Thanks
...
Hi!
I have been using CC.NET for a while and decided to try Team City.
The initial and default configuration is very easy, but how do I swap configuration files after code is checked out and before unit tests are run.
I am using TFS, NUnit.
1. When working locally I have configuration file pointing to local server.
2. On the build se...
HI ,
I am a PHP developer. I keep getting told by a friend who works as a service delivery consultant to move into SharePoint. My question is if I have no experience in .Net would it be hard for me to move into SharePoint? So should I learn .Net then move into SharePoint?
...
We are developing a MSI installer solution (based on VDPROJ, unfortunately) that will install an instance of our server application. The installer has all been designed to support the concept of installing multiple instances. This means we've written a small utility that takes a 'stub' MSI and then outputs a configured MSI with a unique ...
Where is the best location to place resource strings? Does it depend on scope? Currently most of our strings are being placed at the project level, but certain strings are only needed for one form. My thoughts would be that these strings should be placed as close to their use as possible.
EDIT: This is a WinForms question. I've ad...