I am currently playing around with Silverlight3, C# and LinqToSQL .
I have build up a database on a SQLExpress Server with some tables for example:
Employees ( Id, Name, DepartmentId, TimeStamp )
Departments ( Id, Name, TimeStamp )
The Id fields are VarChar(50), the Name Fields are VarChar(100) and the TimeStamp fields are of type time...
I have a datagrid in a .NET winform app. I would like to rightclick on a row and have a menu pop up. Then i would like to select things such as copy, validate, etc
How do i make A) a menu pop up B) find which row was right clicked. I know i could use selectedIndex but i should be able to right click without changing what is selected? ri...
Why does the high part of the stack (in Exception.StackTrace) gets truncated?
Let's see a simple example:
public void ExternalMethod()
{
InternalMethod();
}
public void InternalMethod()
{
try
{
throw new Exception();
}
catch(Exception ex)
{
// ex.StackTrace here doesn't contain ExternalMethod()!
}
}
It seems l...
see also "What should I consider when
choosing a mocking framework for
.Net"
I'm trying to decide on a mocking framework to use on a .NET project I've recently embarked on. I'd like to speed my research on the different frameworks. I've recently read this blog post http://codevanced.net/post/Mocking-frameworks-comparison.aspx ...
I am wondering if there is a straightforward way to use .NET's built in HTTP support to parse arbitrary bytes into nice HTTP requests and responses. For example, I would like to be able to pass in a byte array containing "HTTP/200 OK\r\nContent-Type:...." etc and get out some structure representing the status code, and decoded content.
...
can vb.net 2008 bet set to only run in 32bit?
...
I have a few local variables and I want to divide them all divide them all by the same number.
decimal a = 0;
decimal b = 0;
decimal c = 0;
...
decimal n = 0;
decimal divisor = 0;
<perform calculations to give all variables meaningful values>
divide each decimal (a - n) by divisor then assign value
Beside dividing and assigning eve...
I have a website, with basic Forms Authentication working alright. Users have emails that contain links to my site, with a querystring variable. Users are prompted to login correctly, but using
FormsAuthentication.RedirectFromLoginPage(userName, false);
Does not work when the original url contains a querystring.
I've tried these requ...
Lets say I have some random .cs file containing a class with some properties and methods of all sorts.
How can I iterate the names (as strings) of all these public string properties?
Example.cs:
Public class Example
{
public string FieldA {get;set;}
public string FieldB {get;set;}
private string Message1 {get;set;}
public int some...
This is more of a general question so the answer does not have to be in C#. I have a general code structure below that I use to recursively walk a tree structure. In this particular case I am appending to a string builder object in each iteration.
Is there a way to improve this code to be faster or better?
public static void Recur...
Hey guys,
I've been trying to find a POP3 C++ client on the internet but I haven't found any luck.
We are working on a project for school that is essentially a C++ course (so I can't use C#...), and we are making a Email client that has to support sending and receiving emails and attachments. We are also working with .NET (because app...
I need to know how I can rewrite the following SQL query in NHibernate's ICriteria format. It is basically a way to mimic the MS-SQL's RANK() feature and return only those results that are most current.
SELECT a.Name, a.Value, a.CreationDate
FROM MyTable a
WHERE EXISTS
(
SELECT NULL
FROM
(
SELECT TOP 1 CreationDate
FROM M...
Hi All,
I am able to consume a BW Soap over HTTP service in C#.NET but struggling with BW Soap over JMS Service.
When I included the WSDL file under web references and compiled. Here is the warning that is displayed.
"At least one import binding for the ServiceDescription is an unsupported type and has been ignored"
My understanding...
I've been trying to figure out how to convert a string to a String in Visual Studio 2005 with no luck.
Here is the relevant code:
#include <string>
using namespace std;
#using <System.dll>
using namespace System;
string test = "a test string";
So I'm trying to convert test into a String^ to use inside other .NET classes, can anyone ...
With applications now being developed for users of many nationalities, localization is very important. I read on firefox's web site it is available in 70 languages. This increases their potential market dramatically.
During a recent user acceptance testing session for my project, a bug was found. The exception was:
"String was no...
Hi everyone,
How can I write this output to the stream ? I want to write element to the stream as text/xml format. I am just trying to create simple REST service. I want to use element.Save method.
<%@ WebHandler Language="C#" Class="Calculation" %>
using System;
using System.Web;
public class Calculation : IHttpHandler {
public...
I am creating a remote test runner for Gallio. My plan is to create an HTTP Web Service server. I am comfortable creating the server myself, but I would prefer to use an existing HTTP server. Does anyone know of an HTTP server that is appropriate for building a web service server. It would be ideal if it is open source.
Pat O
...
I had trouble coming up with a good way to word this question, so let me try to explain by example:
Suppose I have some interface. For simplicity's sake, I'll say the interface is IRunnable, and it provides a single method, Run. (This is not real; it's only an example.)
Now, suppose I have some pre-existing class, let's call it Cheetah...
I have the following code snippet in an ASP.NET app (non Silverlight)
string sText = "Test text";
SpeechSynthesizer ss = new SpeechSynthesizer();
MemoryStream ms = new MemoryStream();
ss.SetOutputToWaveStream(ms);
ss.Speak(sText);
//Need to send the ms Memory stream to the user for listening/downloadin
How do I:
Play this file...
I have several projects that require me to monitor files, and then edit them as they are getting written to disk. I have a feeling that what I am looking for is operationally the same as how anti-virus tools operate. Let me give more details:
1) I need to trap all files saved by Office application, and then add specific company tags to t...