One of our company's Windows Forms application had a strange problem for several month.
The app worked very reliable for most of our customers but on some PC's (mostly with a wireless lan connection) the app sometimes just didn't respond anymore. (You click on the UI and windows ask you to wait or kill the app).
I wasn't able to track d...
I'm currently working on a project in which at one point, the user may right click a button which brings up a contextMenuStrip. I am already able to find the owner accurately from that strip, and manipulate the button clicked as follows:
Dim myItem As ToolStripMenuItem = CType(sender, ToolStripMenuItem)
Dim cms As ContextMenuStrip = CTy...
Inspired by an SO question. The Attribute class has several overloads for the IsDefined() method. Covered are attributes applied to Assembly, Module, MemberInfo, ParameterInfo. The MemberInfo overload covers PropertyInfo, FieldInfo, EventInfo, MethodInfo, ConstructorInfo.
That takes care of most of the AttributeTargets. Except for on...
Lets say UserA and UserB both have an application open and are working with the same type of data. UserA inserts a record into the table with value 10 (PrimaryKey='A'), UserB does not currently see the value UserA entered and attempts to insert a new value of 20 (PrimaryKey='A'). What I wanted in this situation was a DBConcurrencyExcep...
I have a StringCollection object with 5 words in them. 3 of them are duplicate words. I am trying to create a LINQ query that will count how many unique words are in the collection and output them to to the console. So, for example, if my StringCollection has 'House', 'Car', 'House','Dog', 'Cat', then it should output like this:
House ...
Is it normal practice to use a TypeConverter for serialization? There is a class that I do not own that has a "lossy" TypeConverter. When converting to a string, it formats its floating point data with "G4", so that when this type is displayed in a PropertyGrid, it's easily readable.
I would like to also use this TypeConverter to conve...
I was wondering if there is a straightforward way of getting a user's session cookie and posting it to a page on a different site to be processed there?
...
I've recently discovered OpenSSL.NET and it's a pretty sweet little wrapper.
I'm trying to execute the following code:
public static void DoSomething(byte[] buf)
{
OpenSSL.Core.BIO input = new OpenSSL.Core.BIO(buf);
OpenSSL.X509.X509Certificate b = OpenSSL.X509.X509Certificate.FromPKCS12(input, "passphrase");
...
Hey all. I realize this is a rather long question, but I'd really appreciate any help from anyone experienced with RIA services. Thanks!
I'm working on a Silverlight 4 app that views data from the server. I'm relatively inexperienced with RIA Services, so have been working through the tasks of getting the data I need down to the client,...
What is the best way to determine if a user belongs to particular AD user group using C# without have to enumerate through all the user's groups. Can this be done using a single LDAP query or search?
...
I am returning two lists from the database using LINQ to SQL compiled query.
While looping the first list I remove duplicates from the second list as I dont want to process already existing objects again.
eg.
//oldCustomers is a List<Customer> returned by my Compiled Linq to SQL Statmenet that I have added a .ToList() at the end to
/...
public class Parser
{
Downloader download = new Downloader();
HtmlDocument Page;
public Parser(string MovieTitle)
{
Page = download.FindMovie(MovieTitle);
}
public Parser(string ActorName)
{
Page = download.FindActor(ActorName);
}
}
I want to create a constructor that will allow other d...
I need some classes for playing short wav sounds, this classes would load this wav files into memory when an instance created, play sounds in background when needed, release this wav files from memory when an instance disposed.
How can I do this on C# for windows (.Net 2.0)? (Win API's sndPlaySound, OpenAL or may be any wrapper)
Ideall...
Employee emp = new Employee();
comHandledBySQt.DataSource = emp.GetDataFromTable("1");
comHandledBySQt.DisplayMember = "FirstName";
The above code displays drop list of employees first names in a combo box. I want first name and last name to be displayed. How can i do it?
I tried to include two colu...
With this string
http://sfsdf.com/sdfsdf-sdfsdf/sdf-as.html
I need to get sdf-as
with this
hellow-1/yo-sdf.html
I need yo-sdf
...
The .net charting controls are advertised as being built into .net 4.0. However, they do not work in Visual Studio 2010 Pro or Visual Web Developer 2010 Express. I get the error, System.Web.HttpException: Error executing child request for ChartImg.axd.
That sounds like the message from .net 3.5 if charting wasn't set up correctly. But t...
Hi,
I need to run an image processing application on a .NET server.
Do you have any tips what I should/can do?
I implemented the code in a webservice, but performance is very slow (at least 10x slower than when executed in a windows application).
Any help will be greatly appreciated.
thanks
...
To clearify: I use the POCO generator so that the entities are not tightly bound to the EF implementation.
In my entities, I tend to add comments for the properties but as I update the model and save it, all the comments are removed.
How can I prevent this behavior?
...
how to save application state and restore it after reboot in .NET 3.5 (c#)?
...
I have a blocking problem
I have XML file under some url http://myserver/mywebApp/myXML.xml
In the below code which I run in Console Application, bookcollection has null Books field :(
<books>
<book id="5352">
<date>1986-05-05</date>
<title>
Alice in chains
</title>
</book>
<book id="4334">
<date>1986-05-05</date>
<title>
1000 ways t...