I recently saw a demo of a .NET 3.5 product, which has a "Universal Search" widget ... ie, it allowed you to search their entire product, for either your own strings, or their strings, and the results were context-sensitive links to different parts of the application.
For example, let's say this was a Point of Sale system, you could sea...
I have a button component that draws to a bitmap using LockBits. At the end of the onclick event handler i use the code.
pictureBox1->Image = bmp;
However in the MSDN help it says to use the pictureBox OnPaint event handler.
The program runs perfectly, and i get smoke/haze/dust effects for free. I would really like to use this method...
I want to validate the input of a TextBox to be a binary number.
I know I can do this with RegEx but I wanted a more 'inmediate' validation, like allowing just 1's and 0's to be entered.
I thought of using MaskedTextBox but I don't know how to just allow those two characters.
...
Lets say I have two projects A and B. A depends on B. I can specify this in two ways:
Include A and B in the same solution and specify B as a project dependency for A. This shows up in A's msbuild project as a "ProjectReference" node.
Include a reference to the B's compiled dll as dependency for A. This shows up in A's msbuild project ...
Suppose we want to give condition using switch statement with the use of enum. Can we do that?
If yes, then how?
...
I have just looked at using iTextSharp 5.0, however things like table/cell have been refactored. I'm wondering if anyone knows of a clear way to migrate from 4.x to the new version.
...
When i run the application i need to extract the information about the sequence of methods or classes the application touches when any event is performed on the application.
Is any there other tool other than profiler?
...
My main entity (Account) graph looks like the following:
Account
Manager
SalesPerson
Trader
The Manager, SalesPerson and Trader entity are of type person. Now while creating the main entity (along with inner entities) I need to create a new Person if it doesnt already exist. This introduces a problem, where in if the same (...
Hi,
Recently I got a project when after opening in visual studio 2005 in build mode drop down, only debug mode is shown but release mode not shown.Project builds successfully in debug mode is there a way to enable release mode.
Thanks
...
I've customer id, customer name, contact no, address, country name(drop down list). and after inserting the data into the sql database It will displaying in grid view. But my requirement is, I've search button and one text box. after entering the any character into the text box then I click the search button. The result will be display i...
Hi,
I'm wanting to copy an already existing Google Docs Spreadsheet to a new Google Docs spreadsheet. I dont think the v2.0 .NET API can handle it natively (or if so I can't find the class/method), however It looks like the v3.0 protocol can but I'm not sure how to implement this in the current framework or even if it is possible with t...
IS there a difference between those 2 ways of object creation?
new MyClass() { Id = 1, Code = "Test" };
or
MyClass c = new MyClass();
c.Id = 1;
c.Code = "Test";
Whats faster? I am assuming there is no difference between the 2.
Thanks :-)
...
i like to get code from c++ dll ,i know we easily get from .Net dll by reflector. Is there any method available in c++ for this?
Thanks In Advance
...
Hello everyone,
I am using VSTS 2008 + C# + .Net 3.5 + ADO.Net + SQL Server 2008. I have some C# string type variables, and I want to insert them into database as type DateTime, any code samples?
My problem is how to do the conversion from string to database DateTime type.
thanks in advance,
George
...
I was just doing some research on RedBlack Tree. I knew that SortedSet class in .Net 4.0 uses RedBlack tree. So I took that part out as is using Reflector and created a RedBlackTree class. Now I am running some perf test on this RedBlackTree and SortedSet inserting 40000 sequential integral values (starting from 0 to 39999), I am astonis...
Possible Duplicate:
Return 'null' or throw exception
Say I have a method
public Person LoadPersonFromDatastore(int personId)
{
...
}
What should I do if the person was not found? Is it best to return null or should I throw an Exception? My opinion would be not to use an exception here since it adds no useful information i...
Hello all,
I am currently developing a control that shows a "linked label" everytime the user adds a visual item to another UI component. When that happens, I link the label in the control to the item added and by clicking over the label the item in the list will be shown.
Well, the problem is that this control can be included in a Fi...
I have recently moved to C#.net 4.
I love Parallel.For, but not sure when to use and when not to.
I know that when order is not important for me - I'll use it.
But are there any tests regarding the overhead of working with Parallels? Meaning, if my loop runs only 10 times (and performs very little logic) - should I avoid Parallels? Are...
I am invoking one of the functions from assembly but I am getting MissingMethodException. I have open exe in .netreflector and show that function is available at right place though it is giving error. Here is the code.
private void button2_Click(object sender, EventArgs e)
{
Assembly obj = Assembly.LoadFrom("Solo4O.exe");
...
Hi,
I have made a program where I read set of records from the database and then save it in a datagrid. From here I make the user download the file as a excel file.
Now the user make changes to the file and then upload it again and from here I read the uploaded .xls file and make the necessary changes in the DB.
The problem is wheneve...