for clarity lets say we have students and classes, its a many to many relationship.
I have a Dictionary where the key is the student id and the Enumerable is a collection of classes(say we just have the id ) and I want to revert this to a Dictionary of classId, students
is there a way to do this with Linq? I can think of a way to do th...
The question I always wanted to ask and was afraid to, actually - what language is .NET Framework written in? I mean library itself.
It seems to me that it was C and C++ mostly. (I hope Jon Skeet is reading this one, it`ll be very interesting to hear what he thinks about it)
...
No other control does this other than the scrollbars of panels, etc. Clicking and holding a button, a label, a link, a tab, whatever other control does not have this effect. But as soon as a user clicks the scrollbar, or clicks and drags the scrollbar, all other processing on the UI thread is halted. This is something that is a big pr...
Hello,
I'm learning to build Silverlight 3 apps using WCF to communicate with the back end. We are going to deploy to IIS7 on Server2008 or Vista. The client binaries as well as the web service binaries are all located in the same IIS web directory. When I hit the service front page (http://localhost/MyService.svc) it returns just fi...
I have a public variable "testStr" in my applications main form. I have a tabControl which adds tabs loaded with user controls. How can I reference "testStr" from these user controls? I would imagine its either Application.* or parentForm.* ... but everything I'm trying isnt working, not really sure how to do it and I'm a bit new to .net...
Hi,
I'm working on a program where I need to match a regular expression and a string. The string is pretty simple actually but I'm having problems with my current regex (I'm using the .net regex engine)
My current regular expression is "^[VvEeTtPp][^a-zA-Z0-9\s]\d{0,12}?$"
Now, the string I want to match always follows this pattern
...
Is there documentation/utility that shows the default control template of a given control? I'd like to see how a given control is constructed so I can customize the behavior correctly and/or choose to use a style instead...
...
Hi guys
I am about to start a new project and am deciding what data access technology I will be using... I really like LINQ to SQL for a variety of reasons but should I start the new project using the Entity Framework instead??
I have this perception that the Entity Framework is more bloated and needlessly complicated, thus accounting...
Hi there, we're trying to figure out a way to build a .NET application that can run entirely self contained from a CD. Basically user pops in a CD, boots to an operating system on the CD and a barebones .NET Framework starts up with the application. We've looked at hacking the .NET Framework into WinPE but realize it's really an unsupp...
I am trying to use ICriteria to create a query that has a join
condition. The SQL I am trying to generate should look like this
SELECT c.ClientID
FROM Client c
LEFT OUTER JOIN ClientContact t on c.ClientID = t.ClientID AND
t.ContactType = 'Email'
If I use a criteria like
m_ClientRepository.QueryAlias("client")
.CreateCriteria("c...
I´m trying to use an external XML file to map the output from a stored procedure into an instance of a class. The problem is that my class is of a generic type:
public class MyValue<T>
{
public T Value
{
get;
set;
}
}
Searching through a lot of blogs an articles I've managed to get this:
<?xml version="1.0" encoding="ut...
I've been given some "XML" files that don't quite have a proper schema (I think that's the problem) and the medical device that generates them cannot be changed to generate easy-to-parse XML. (With such a tantalizingly small modification (extra wrapping Images tags around the Image entries) it would be trivial to read these files---isn't...
I am looking for a C# library that would translate the HTML code (and the css specified in the code) into a DOM tree for simpler parsing. I am looking for something similar to this one (which is in PHP):
http://simplehtmldom.sourceforge.net/
Of course I know I could embed a browser control, but I am looking for something more efficient....
My application exits for no reason, most likely due to errors in the profiler I used because it interferes with all the CLR runtime stuff. The issue is is there any file at any location where .Net framework logs these kind of errors?
...
Hi guys
I have a website that I am working on that has both an intranet and internet deployment. The only difference between the 2 is a couple of config settings.
The internet version works fine as it just uses forms authentication (which is defined in its web config) and if not logged in the user is directed to a login page.
The intr...
Hi folks,
We've got a .NET project at work, which we lost (human error). The person who wrote the code said she had three projects in the solution => one webform, one winform and one class library.
Now, we have the final DLLs and website. Is there anything we can do with this?
For the class library, I was thinking about using Reflect...
I'm using the Windows DPAPI to encrypt some sensitive data for me. The cipher is stored in the registry. This all works well, but I was wondering if someone could clarify my understanding of the 'entropy' bytes that are (optionally) supplied to ProtectedData.Protect() in .NET.
The 'entropy' byte array appears to be analogous to an initi...
Hello everyone,
For a .Net MemoryStream object instance, do I need to close it explicitly after using it? Or no need to close it? Which is the best practices?
I am using VSTS2008 + .Net 3.5 + C#.
thanks in advance,
George
...
Possible Exact Duplicate: Sending Email in C#.NET Through Gmail
Hi,
I'm trying to send an email using gmail:
I tried various examples that I found on this site and other sites but I always get the same error:
Unable to connect to the remote server -- > System.net.Sockets.SocketException: No connection could be made because the target ...
Hello everyone,
For this method, XmlSerializer.Deserialize, what kinds of exception may be thrown? XmlException? InvalidOperationException? I did not find any exception description information from this method. My question is what kinds of exception could be thrown from this method?
http://msdn.microsoft.com/en-us/library/dsh84875.aspx...