Hi all,
I have a method like this: void m1(string str) and have a class like this:
public class MyClass
{
public bool b1 { set; get; }
//and other properties
}
Now why following code does not cause compile error?
IClass2 _class2 = new Class2();
MyClass c1 = new MyClass();
_class2.m1("abcdef" + c1);
When I debug it, I real...
Hi,
I recently decided to convert my .Net Web Site to a Web Application. I followed the guidelines by creating a new Web Application, copying the files from my Web Site, including the files in my application and then selecting the option Convert to Web Application.
However since I have done that I have received hundreds of errors rela...
I would like to incorporate a descent pdf viewer like this:
http://viewer.zmags.com/showmag.php?magid=174428#/page18/
for my website in order to view my pdfs.
How can I achieve this?
...
I could not think of a better way to title this question. my apologies :)
Anyways, so I have been given a url to a service that I am to consume. There is no information that I have on this service as yet, and so before I ask the clients any dumb questions, I want to know if it really matters if I am consuming this service by adding it t...
Hi All
I have the following method:
/// <summary>
/// Gets the specified side of trades.
/// </summary>
/// <param name="tradesDictionary">The trades dictionary.</param>
/// <param name="side">The side.</param>
public IEnumerable<TradeRecord> GetTrades(Dictionary<Guid, TradeRecord> tradesDictionary, Side side)
{
return (from tradeR...
Hi,
I don't know what we can do with a custom exception, what we can't do with a built-in one. It seems a naive question but I really have no idea about that.
What do you think?
...
hi guys,
i'm trying to use unity to resolve an generic instance of the IChannelFactory<ISomeType> to create channels to a service i have written.
The problem is that the concrete version of this class ChannelFactory<ISomeType> takes the concrete type System.ServiceModel.Channels.Binding as a parameter.
My first problem was that it c...
We've licensed some third-party e-mail components and have developed a set of components for our system that uses them. These components are then loaded dynamically at runtime by an IoC container.
However we have recently noticed in testing on a non-development machine that because the main .EXE which is "hosting" our components does no...
Is it possible to use a custom root CA for FiddlerCore to intercept HTTPS traffic.
What I need is assigning a certificate to be used to to sign all host certificates.
Another solution can be supplying certificate information to FiddlerCore before creating root certificate.
...
From MSDN:
There are two reasons to implement this interface. The first is to control how your object is serialized or deserialized by the XmlSerializer. For example, you can chunk data into bytes instead of buffering large data sets, and also avoid the inflation that occurs when the data is encoded using Base64 encoding.
How does ...
This MSDN article states that:
An isolation level has connection-wide
scope, and once set for a connection
with the SET TRANSACTION ISOLATION
LEVEL statement, it remains in effect
until the connection is closed or
another isolation level is set. When a
connection is closed and returned to
the pool, the isolation level...
I have a requirement of populating a new window (With no menus, no address bar) using the existing data that I have on the page.
I am using a java script function for this purpose.
function popup() {
window.open("../AcknowledgeStatements/OutStandingAckInPdf", '', 'scrollbars=yes,width=740,height=600,resizable=yes');
}
<inp...
I'm sorry this question is going to be a bit vague because I'm not entirely sure what I'm looking for.
Basically in my (Asp.net MVC) web app I have some basic (manually coded) workflow triggered by my various user inputs.
I need to send email configurable notifications when certain events happen.
For example, there is an update status...
I am currently reading up on documentation for a possible assignment I might be put on. In a design document they talk about the .exe.config file. They state that its only purpose is to store constants:
"Also note that this file is meant to store constants only, it is not meant to write configuration values to (and the .NET 1.1. frame...
Hi guys,
Is there any way to show custom input validation message through javascript? I have javascript validation method innvoked with Form.Submit, so if validation goes wrong, I'd like to have a custom text next to the field I have validated (similar as ASP.NET MVC 2 validation summary).
Regards
...
I'm thinking of replacing a lot of inline foreaches with Linq and in so doing will make new methods, e.g.
Current:
foreach(Item in List)
{
Statement1
Statement2
Statement3
}
Idea:
List.Foreach(Item => Method(Item))
Obviously Method() contains Statement1..3
Is this good practise or is calling a method thousands of times...
I am getting these "System.Data.SqlClient.SqlException" exceptions during peak hours on a high-traffic website (ASP.NET).
The full exception:
SomeMethodName
- Ex.Type: System.Data.UpdateException - Ex.Source: System.Data.Entity
- Ex.Message: An error occurred while updating the entries. See the inner exception for details.
- Ex.S...
Can I add links in comments to a code block in Visual studio ?
For example:
// block 1
class class1
{
}
// block 2
class class2
{
// review [___class1]
}
[___class1] is a link for class1
Thanks in advance.
...
I have an object(class): Foo.
It has a property: Bar.
What should I do to be able to Bind to that 'Bar' property?
(WPF, .NET 4)
EDIT:
TO be more explicit, I give an example:
I have a Dot:UserControl
I create 2 properties of Dot - CenterX and CenterY:
public double CenterX
{
get
{
return Canv...
hey there!
The brand-new WCF-based code needs (in the meanwhile) to provide a service to a legacy code that works in plain HTTP. So that, along with new SOAPed requests, I need to tailor some oldskul-style communication (on a different port): to be able to receive plain HTTP, analyse the request body and send the plain HTTP with some bo...