I have a class with a private set property that I want to stub out with rhino mocks. When I try to do this, though, it gives me a compile time error saying I can't set a read only property. I'm new to using Rhino Mocks so I must be missing something here...
public Interface IFoo
{
int Quantity { get; }
}
[TestMethod]
public void ...
I have an asp:DataGrid with templated columns. Here's one of those columns:
<asp:TemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="btnDetails"
Runat="server"
CommandName="details"
Text="Details"
Font-Size="0.8em"
CommandArgument='a=<%# Eval("a")%>&b=<%# Eval("b")%>' />
<...>
When the command fires, the Comma...
Hi all,
I have stumbled on an impossibly good performance behaviour with PostSharp. To evaluate the speed I wrote a little program, that would execute one function a specified number of times, and if PostSharp is enable it would generate and delete a few hundred strings, just in memory (non fixed composition, so they are not auto-intern...
i have 4 pages in aspx. page A, B , C, D. if i go from pageA to Page B then after clicking submit on PageB its should goto PageC and open Page D in a new window at same time. but if i go directly to PageBand click submit then it should only goto PageC and not open PageD in new window.
i am using /?dest=pageD.aspx in querystring but it wo...
I'm refactoring some code and I've been hit with a dilemma.
Let's say we have the following scenario:
A Core Assembly that contains many common interfaces and classes
A Library Assembly that contains more specialized classes.
The Library Assembly references the Core Assembly. So far so good.
Due the fact that I'm refactoring this, ...
I've found plenty of examples how to do encryption in C#, and a couple for Android, but I'm particularly looking for a way to handle encrypting (using something like AES, TripleDES, etc.) from Android, and eventually wind up being decrypted in C#. I found an example for encoding AES in Android and encoding/decoding AES in C# but am not s...
I am trying to write a LINQ statement which selects only the rows in a table with the most recent rundate. For example, if I had a table with columns RunDate(datetime) and Value(decimal) one way of accomplishing this through sql might look like:
SELECT Value
FROM Table
WHERE RunDate = (SELECT MAX(RunDate) FROM Table)
Is there a way t...
What’s Automapper for? How will it help me with my domain and controller layer (asp.net mvc)
...
We are using the .NET DataSet and DataTable classes to filter data. But we have two tables with almost 596,814 records in one table and around 10,000 records in the other. DataSet filtering using DataTable.Select is massively slow.
Are there any faster approaches?
...
i want to call an exe file(abc.exe) from another application(hello)
how can i get the path of abc.exe file programatically so that i can use it to invoke abc.exe
abc.exe is not the part of executing assembly
so
assembly.GetExecutingAssembly() will not work
...
I was playing around with VS2010 beta2. I noticed that if I try to add System.Core.dll to a project which does not already have a reference to that, in VS2010, it complains saying I cannot add that assembly as it is already referenced by the project system. Any idea why they are doing that in VS2010/4.0? Is it because they have forwarded...
Who provides the best 3rd party Silverlight controls for LOB applications? In the past I’ve used Infragistics for WinForm controls which were very good and they also provide good support. However, they seem to be a bit behind the likes of Telerik in the Silverlight space. I’ve also noticed the Silverlight toolkit as well – are these as r...
I have one VB.net ClassLibray application.
I have a line of code:
System.Diagnostics.Process.Start("http://stackoverflow.com/")
This will take me to stackoverflow website.
the question is when i close the stackoverflow website how to get a response back to my application ?
ie,
How to handle the sessions of external web pages in .n...
Is there any way to tell via reflection that a generic list of Type A is related to a generic list of Type B? For example, I have a List<string> and a List<int>. How can I tell via reflection that both these types are 'instances' of List<T>. I think I'm having a problem because List<T> isn't a real type. You can't do typeof(List<T>) ...
How to make a native API to be PInvoke friendly?
there are some tips on how to modify native-programs to be used with P/Invoke here. But before I even write a native programs, what are the things I should look out to make my programs/library PInvoke friendly?
using C or C++ are fine.
update:
if I write a C API, what are the things I h...
I am using a link button to redirect the page to my desired location with some query string value from Jquery.
The Link Button code are as follows:
<td>
<a id="selectAllLink" class="button" rel="nofollow ibox&width=800&height=400&title=Contact Now"
href="#" onclick="return (this.href=='#');">Contact Selected<...
Dear ladies and sirs.
I have a library code, which should be aware whether it is executed in the context of a web server or standalone application server.
The obvious that comes to mind is to check the name of the application configuration file and if it is web.config - then this is a web server, otherwise - standalone application serv...
I'm looking for a tool like SonarJ but for .NET instead of Java.
SonarJ helps you to find deviations
between he architecture and the code
within minutes. It can be integrated
into your IDE to help you avoid the
introduction of new architetural
violations to your code base. You can
also use it to maintain metric based
so...
Hi,
I have created a windows forms application using vs2008. when i copy the bin folder over to another machine and try to run it the applicaiton throws a filenotfoundexception error. Ive looked at the references files used in the project and each file points to either
c:\Windows\Microsoft.NET\Framework\v2.0.50727...
c:\Program F...
I want in my asp.net application is to create a schedule.The events should be dragged from the treeview and dropped onto the calendar control to create the schedule.What i want is that someone could suggest what is the best calendar control available in the market to do so.My budget is 300$.If there is some other way of achieving this th...