Hi,
"Operation is not valid due to the current state of the object" exception is thrown at .Clone() operation in .net.
I'm using framework 2.0.
Any ideas what the reason could be.
Thanks in advance.
ravi
...
There are times when I want to convert user input into its literal value in a regular expression. I.e. if the user enters C:\Win\Bin\File.txt the regular expression would be something like C:\\Win\\Bin\File.txt since certain character combinations have to be escaped. Does anyone know of either a tried and true piece of code that does t...
I am preparing for MCTS 70-536, after reading this article. I am not 100% sure I understand the concept of typeforwarding. I find the steps given in the article even more confusing. Whats the deal if I am copying the sourcecode of type to be forwarded and recompiling it. What happens with old dll and the client ??
...
Yesterday I wrote a piece of code to remove all the controls in a form that fulfills certain criteria. Writing it naively, this is what I come up with.
for (int i = 0; i < this.Controls.Count; ++i)
{
if (this.Controls[i].Name.Length == 2)
{
this.Controls.Remove(this.Controls[i);
}
}
But it so happens that the code ...
Which Java SOAP XML object serialization library would you recommend for Java object exchange with other platforms / languages (.NET, Delphi)?
Communication scenarios could look like this:
Java object writer -> SOAP XML text -> .NET or Delphi object reader
.NET or Delphi object writer -> SOAP XML text -> Java object reader
I know th...
Hi all,
i have this code to show in a panel images with a pIctureBox :
private void ARR(int cNumber, string exc)
{
int Xpos = 8;
int Ypos = 8;
Image img;
Image.GetThumbnailImageAbort myCallback =
new Image.GetThumbnailImageAbort(ThumbnailCallback);
imgArray = new System.Windows.Forms.Pi...
Firstly, I realise that this is a very similar question to this one: http://stackoverflow.com/questions/345982/which-are-the-good-open-source-libraries-for-collective-intelligence-in-net-java
... but all the answers to that one were Java centric so I am asking again, this time looking more for .Net (idealy C#) ideas.
A little backgroun...
Is there a way to know how many bytes of a stream have been used by StreamReader?
I have a project where we need to read a file that has a text header followed by the start of the binary data. My initial attempt to read this file was something like this:
private int _dataOffset;
void ReadHeader(string path)
{
using (FileStream st...
I will soon work on a project about a mobile application.
This application will work on a PDT with Windows Mobile and we will use Visual Studio and .NET to developp it.
This application will intensively use Wifi and need to consume as little power as possible.
I found on the internet a lot of stuff concerning embedded software and real ...
Hi,
Can anyone send me a sample nant.build file which reads a value from a text file named file.txt.
Thanks
Maddy
...
The text could be stored in the database using either markdown, bbcode, html, etc. Should I remove any allowed tags from the search terms? Does your markup parser have any method to assist in that task?
I was going to use like '%searchword%' queries. Does full text search offer any advantages for such a simple text search?
Update: It s...
I am using a class to bind property value to controls like textbox.I want the validation
error template should called when i will tab away from that text box.I have used Update SourceTrigger= LostFocus proprty but its not working.Any suggestion will be helpful.
Ali
...
I have some (a bit more than a little) code where object values from a DataReader are assigned to business object properties. This code is quite untidy to look at with lots of null coalescing, parsing, etc. I was wondering how to implement a tidier means of converting the object values from the DataReader to the appropriate values for ...
How do I use a XAP file created in Silverlight in my ASP.NET application?? I mean what are all the registration and changes to be done in the pages in order for the Silverlight content to be displayed in my aspx page?
...
I have ReSharper 4.5 and have found it invaluable so far but I have a concern; It seems to want to make every variable declaration implicit(var). As a relatively new developer how much should I trust ReSharper when it comes to this? Take the below code snippet from a method that Paints Tab Headers.
TabPage currentTab = tabCaseNotes.Ta...
In 1.x, every web project had a references and web references item in the solution explorer that i can expand and remove/add/refresh.
They don't have it anymore in 2.x
Where did the references go?
EDIT: I realized what i have is a website and not a web application project
...
How to convert all elements from enum to string?
Assume I have:
public enum LogicOperands {
None,
Or,
And,
Custom
}
And what I want to archive is something like:
string LogicOperandsStr = LogicOperands.ToString();
// expected result: "None,Or,And,Custom"
...
I am writing a simple email helper class that will be called by a Windows service. When I test though the email attachment is not sending with the rest of the email.
mailAttachmentFilePath is an ArrayList (just for clarification) and mail represents MailMessage class.
if (mailAttachmentFilePath.Count > 0)
{
foreach ...
I am using the Configuration Section Designer for .NET to build a simple ConfigurationElementCollection. It appears that everything builds just fine and the code is automatically generated since the sub-elements are visible with Intellisense.
Unfortunately, even though I have added elements to the collection in the configuration sectio...
Does anyone know of a .NET library that can handler Crusher archives? I have a Win32 DLL that I'm using via Interop, but it's a lot of work getting it going with more than the basic functions (no documentation, etc).
It doesn't appear to be am implementation of any of the common compression formats.
...