I am trying to consume a web service specified using WSDL by creating a WCF proxy using svcutil.exe, but the WSDL specifies that some of the operations have parameters that are optional (minOccurs="0"), for example:
<xs:element minOccurs="0" maxOccurs="1" name="meetingId" type="xs:int" />
Unfortunately, the generated proxy does not al...
This question got me thinking about the .NET equivalent. What value is there to the ThreadState property of the Thread class? In this code example:
if (someThread.ThreadState != System.Threading.ThreadState.Running)
{
someThread = new Thread(SomeMethod);
someThread.Start();
}
The someThr...
hey guys, here's the issue,
Essentially, I have a very large List containing in turn relatively large Dictionaries
So basically, I have a very big in memory collection.
I then serialize this collection manually to XML, and send it over http. needless to say, the XML is too large, sometimes so large I get an OutOfMemory exception befor...
This is a simple question. If the content of two lambda expressions in the same class are exactly the same, will the compiler generate and use one backer method, or will it generate a method for each instance?
Example
ctl.MouseOver += (sender,e) => UpdateStatus();
ctl.MouseOut += (sender,e) => UpdateStatus();
Does this generate one o...
Can anyone help me here, the following works fine on my xp but not my vista machine. Im querying a Generic dictionary.
Both computers have .NET 3.5 + SP1, 3.0, 2.0, etc., and have the web project targeted to 3.5 Framework.
using System.Linq;
string val = "Test";
var d = DictionaryOfStuff().Where(n => n.Key.ToLower().Contains(val.ToLow...
What is the difference b/w using FieldInfo.SetValue vs Type.Type.InvokeMember(fieldName, BindingFlags.SetField, ...) ?
...
I can't GET any of the pages hosted on my development machine externally, even after opening an exception at the Windows firewall.
...
Hi,
I'm wondering if there are any useful (free) libraries out there to
help the development of Console applications.
Just a simple example:
What about a library that encapsulates all the behaviour to
select files in a console application (aka the OpenFileDialog for Console applications).
There's MonoCurses of course, but I'm wonder...
I have learned that builds should be very straight forward and requires less human intervention. In my situation, I have 3 environments, DEV (development version), SIT (STG integration testing) and UAT (user acceptance testing). All these environments have different database connection details and other settings (such as logging).
Curr...
Does anyone have any idea what could cause a 10035 error (EWOULDBLOCK) when reading on a blocking socket with a timeout? This is under Windows XP using the .NET framework version 3.5 socket library. I've never managed to get this myself, but one of my colleagues is getting it all the time. He's sending reasonably large amounts of data to...
I have two clients A and B. Both clients have identical, synced local data caches.
If client A makes an offline edit to record X and then client B also offline edits record X and syncs with the server, when client A syncs with the server, the change that client B made is not reflected and no amount of bidirectional syncing makes the tw...
Good Morning!
Given:
public class FooClass
{
public void FooMethod()
{
using (var myEntity = new MyEntity)
{
var result = myEntity.MyDomainEntity.Where(myDomainEntity => myDomainEntity.MySpecialID > default(int)).Distinct(new FooComparer);
}
}
}
public class FooComparer : IEqualityComparer<MyEntity.My...
I have doubt realted to SAO object.
Fo eg. I have Interface ITest which is in ITestObj.dll and RemoteObject(which is registered as SAO) Test which implements ITest in a server called RemoteObject.dll. Now my client just uses ITestObj.dll and try to create the proxy object using Activator method. As per MSDN-
GetObject or new can be used...
Possible Duplicate:
Print property name (not what you would think)
Possible Duplicate:
Print property name (not what you would think)
How do you get the name of the property from the property itself
for example theres a property Myproperty and i want to get Name of Myproperty from the property Myproperty, something lik...
hey guys, I'm totally inexperienced in terms of threads, so here's my question:
How do threads work within an instance of an object, in particular, I'm working on a Windows Service.
So, my Service is basically an instance of an Object right?
So, say I have a System.Timers.Timer in my Service, and that fires an ElapsedEventHandler ever...
Is there a way with the .NET Framework to send emails through an SSL SMTP server on port 465?
The usual way:
System.Net.Mail.SmtpClient _SmtpServer = new System.Net.Mail.SmtpClient("tempurl.org");
_SmtpServer.Port = 465;
_SmtpServer.EnableSsl = true;
_SmtpServer.Credentials = new System.Net.NetworkCredential("username", "password");
_S...
Is there any way I could find out programmaticaly what databases exist on a server? It's because I would like to show user all available databases and allow him to choose the one he's interested in.
...
If I inherit one DBML file from another DBML file, is it possible to visually create associations to the data classes from inherited DBML?
...
Hi guys,
I encountered a problem with SOAP serialization and it would be great to find an answer. Here's a very simplified example:
public void Test()
{
StringBuilder sb = new StringBuilder();
StringWriter writer = new StringWriter(sb);
SoapReflectionImporter importer = new SoapReflectionImporter();
XmlTypeMapping map =...
I'm creating a control with properties of type System.Net.IPAddress. The designer shows these as read-only, and seems to be matching them up with resources. Is there a way to make it so that the user can edit these properties in the designer properties window, rather than having to open up the resource editor?
...