I'm trying to test some classes I've made using mocks, but I've seen all free mocking frameworks in c# aren't able to mock non-virtual methods (if it is not in an interface).
But, there's TypeMock who can do this, so it is possible. Can anyone show how to do it? I may even try to contribute to an open source framework if I can get this...
Apologies in advance as I haven't had much experience with directories before.
I have an ASP.net application, and I have to validate its users against an Active Directory Application Mode instance running on Server 2k3. I was previously attempting a connection with DirectoryEntry and catching the COMException if the user's credentials (...
Is it possible to programmatically create a DBLink in SQL server 2005 in C#?
Suppose I have database A and B. I want to create a DBlink in A to connect B. I will capture the B database info from user and create the DBLink in database A. Is this possible in C# .Net version 2.0?
...
In the sitemap file, I have sitemap Node URL which have more than 1 query string, like...
<siteMapNode url="~/abc.aspx?m=2&c=2" title="title" description="" />
but I am getting error at '&'
how to handle multiple query string?
...
Do you know of any comparison made for comparing WSDL4J WSDLReader class against the .NET solution (e.g., WSDLImporter)?
...
I am using the Win32 API call SetForegroundWindow to set focus to another application's window. I am then using SendKeys to send keystrokes to that window.
This works well apart from when a modal window (such as a File Open dialog) is open. In this scenario I want to set that modal child window as the foreground window.
Using my main a...
Hi everyone!
I have a problem with sorting a DataTable.
I'm using DataView.Sort and then DataView.ToTable() to get the sorted table.
Then I go through the table row by row and create nodes in a TreeView which is shown in a desktop application.
My problem is that I can sort the data in ascending order and it is shown in the TreeView in...
I have a javascript function that checks for a date range. Is there any way to check if a user has input a valid date in a textbox, regardless of format?
function checkEnteredDate() {
var inputDate = document.getElementById('txtDate');
//if statement to check for valid date
var formatDate = new Da...
The below code is the close routine of an Access App our BA wrote. When executed it is not only closing the Access App but my C# winform app as well, on the same computer. The Access app is named DME Referral and my winform app main process runs in the Task Manager as MATRIX.exe.(Yes I am programming the MATRIX...never allow a group of...
Hi,
I've read that the StringBuilder type has a limit (the default is 16 characters), and when you append some text to it, beyond its limit, a new instance is created with a higher limit and the data is copied to it. I tried that using the following code :
StringBuilder test = new StringBuilder("ABCDEFGHIJKLMNOP",16);
test.Append("ABC")...
Hi all,
I am confused on how to connect to Oracle via ODBC.
I have created an ODBC datasource named "oracle" in my Control Panel > Administrative Tools, and used the driver "Microsoft ODBC for Oracle".
In my app.config , I have the following connection strings
<?xml version="1.0"?>
<configuration>
<configSections>
</configSection...
Hey all
I'm new to Crystal Reports and was interested in finding out what books would be most helpful. I'm planning on using the Designer as well as integrating Crystal Reports with a .NET C# application.
Anybody have any idea which are the best books for this purpose?
...
We're doing development for both .NET (Using VS 2008) and Java (using eclipse)
Currently, we're using CVS, but there isn't really a good plugin for Visual Studio 2008, so I'm looking at changing to something that has better support for VS 2008 and Eclipse.
My initial thought was SVN, as it is really close to CVS, but I'm a bit tempted ...
I'm working on a few closed-source projects. (Small ones.) I don't want to share the code of these projects. But I do want to have an easy-to-install version control system that's easily installed on my web host.
I don't have administration rights on this web host so I can't just run a setup.exe on the remote system. Basically, the only...
My .NET application (any-CPU) needs to read a registry value created by a 32-bit program. On 64-bit Windows this goes under the Wow6432Node key in the registry. I have read that you shouldn't hard-code to the Wow6432Node, so what's the right way to access it with .NET?
...
In controller, try...catch can catch exception. How to catch exception in view? for example, a view may have code like:
<%= Html.Encode(Model.MyID)%>
If Model is null, you will get exception when access the view. where to catch the exception and redirect user to a error page with user-friendly error message?
...
Recently I've been playing a bit with Groovy and Grails and I have to say I'm nothing but impressed by the simplicity and productivity this framework could offer.
In the past I've also greeted the world via Ruby on Rails and what not, having that very same feeling so it's pretty much obvious that when it comes to web apps, DRY KISS is d...
I'm using MSBuild (via NAnt) to compile a bunch of VB.Net assemblies. Because these assemblies depend on COM Interop, I need to guarantee that they run in 32 bit mode on 64 bit OS's. I can get the executable assemblies to compile to 32 bit by changing the project in Visual Studio, but I'd really like to be able to force all of the exec...
I've written a simple GDI-based data plotter using C++/CLI but it's not particularly fast (some basic profiling indicates it's the rendering to screen that's the problem).
Is there any way to enable hardware acceleration for a UserControl or is there a .net interface for direct3D? ...or are there some other options I could consider.
We...
Does somebody know if someone has created a Visual basic parser to CodeDom (ie, it takes VB.NET as input and create a CodeCompileUnit graph) ?
SOLUTION
I've retrieved the source code of SharpDevelop, and used their parser, it works just fine !
...