|
On the 98 series, the runtime emulates the feature using threads.
|
|
|
|
|
Thanks Eric
James
Simplicity Rules!
|
|
|
|
|
I want to control the version of an assembly.In the textbook,it write [assembly:AssemblyVersion("1.0.0.0")] before the class ,i put it before the first class into the namespace,when i compile,it told me that 'assembly' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'type'.
who does know how to define the version attribute?
thanks!
confused:
|
|
|
|
|
Assembly attributes need to be placed outside any namespace declaration.
HTH,
James
Simplicity Rules!
|
|
|
|
|
But when I put the attribute of [assembly:AssemblyVersion("1.0.0.1")] outside the namespace declaration,it emits the error that duplicate AssemblyVersion.
I can implement the version declaration in the file of assemblyinfo.cs。
oh,I catch that。The file of assemblyInfo.cs is one of the sourcecode,but it is made by the IDE。
Thanks very much!
|
|
|
|
|
Hello,
I want to write a programm which includes a
Listview, that should work like the view in the explorer.
The problem is that i can not move the items (shown as LargeIcons) in the listview.
Every Item should be able to be placed everywhere within the Listview.
(e.g. it should be possible that one Icons is over an other Icon)
I also want do drag and drop Listviewitems between to ListViews,
i created a new DataObject wich includs the ListViewItem and send it with the DoDragDrop function.
But if i drop the item on the other ListView, i first have to clone the Item and then delete the one in the origin ListView.
Is there any simpler method to realise that ?
Thanks in advance
Robert
P.S.: I use VB.Net but i think it would't be so difficult to import a conlusion from C#.
|
|
|
|
|
Do we have a popup menu like we have in VB6? This would be nice if we don't.
Nick Parker
|
|
|
|
|
Nick Parker wrote:
This would be nice if we don't.
Why do you say that? What's wrong with popup menus?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Nish - Native CPian wrote:
Why do you say that? What's wrong with popup menus?
Sorry Nish, I think I said that the wrong way, long day today.
I meant, if we don't have them, this would be a nice idea to implement. Are you aware of how to implement these in C# or VB.NET? I'll try to be more clear next time.
Nick Parker
|
|
|
|
|
Check out the ContextMenu class, you should find it in the Toolbox as well, toward the bottom.
James
Simplicity Rules!
|
|
|
|
|
Hey people...
I'm trying to use the UnhandledExceptionEventHandler to make a log of unhandled exceptions and fix them...
the problem is... when an unhandled error occurs the framework shows a debug dialog before running my custom UnhandledExceptionEventHandler, even in Release mode.
How can i avoid this dialog?
tnx
Vanclei Matheus
Brazil
MSN Msgr - vmatheus@msn.com
|
|
|
|
|
I wish we had a C#/.NET FAQ here at CodeProject. This link provides an answer you need.
New Window
|
|
|
|
|
Rama Krishna wrote:
wish we had a C#/.NET FAQ here at CodeProject.
You could always start one The thought had crossed my mind a couple of times; but I hadn't seen too many questions asked often; except for "Can I create a program in C# that doesn't require the .NET runtime?".
James
Simplicity Rules!
|
|
|
|
|
This sounds like a really, really, really good idea. I think I will compile a list of FAQ's that I have seen and try to put something together. That is unless someone else is already working on this, I would like to contribute though.
Nick Parker
|
|
|
|
|
You will want to use the try/catch method of handling errors by placing your process that is bombing out within this style. Note that you will want to place your custom error handler at the top above any generic handler.
Ex.
try
{
int i = 10/Int32.Parse(args[0]);
}
catch(IndexOutOfRangeException e)
{
Console.WriteLine(e.Message);
}
catch(FormatException e)
{
Console.WriteLine(e.Message);
}
catch(DivideByZeroException e)
{
Console.WriteLine(e.Message);
}
catch(OverflowException e)
{
Console.WriteLine(e.Message);
}
HTH
Nick Parker
|
|
|
|
|
The UnhandledExceptionEventHandler is an event on the Application object that is triggered when an application hasn't handled an exception.
If you execute some code and it throws an exception; normally you get a dialog box telling you that an exception wasn't caught and some debugging information; THEN it will fire the event handler. What the original poster wants to do is get rid of that dialog box so it only executes his event handler.
It is usually used in a last ditch effort to save some data or to do some error reporting.
The question you were answering was how to catch multiple exceptions from a block of code; his question is basically how to catch any unhandled exception from any block of code.
James
Simplicity Rules!
|
|
|
|
|
James T. Johnson wrote:
The question you were answering was how to catch multiple exceptions from a block of code; his question is basically how to catch any unhandled exception from any block of code.
The try/catch method should work, unless you are trying to write a generic error handler that all code will use, basically w/o implementation, is this what you are talking about? If so, is this something that is available in C# ?? We have something similar with the On Error Goto in VB6. I was only trying to show how you might catch different exceptions, however he could have just put his custom catch code at the top and then just used a generic one below it.
Nick Parker
|
|
|
|
|
Nick Parker wrote:
is this what you are talking about?
The original question was not on how to catch all exceptions. It was about how to write custom unhandled excepttion filter. Look at the link I sent him in my answer, that will make it clear.
|
|
|
|
|
Ok, Sorry to all (Rama, JTJ), I didn't see the link below. Thanks again, interesting article. How about that C# FAQ?
Nick Parker
|
|
|
|
|
Appreciated that if some one can tell me how to do it! Not multiple highlight rows in datagrid and do nothing, but rather can drag/copy those hightlighted rows to other places, so I need to get ids from those selected rows and put into array. Any one has thoughts?
Thanks!
|
|
|
|
|
I succeeded to serialize an object, my problem is to serialize another object that contains an ArrayList of objects. I want to save in the xml each of the objects that are kept in the ArrayList, how can I do it???
thank you very much,sharon
|
|
|
|
|
The collection must be strongly typed in order for the XML Serializer to work. Specifically the indexer must return the type and the IEnumerator implementation of Current must return the same type.
There are a couple different strongly typed generators out there, my favorite is CollectionGen from Chris Sells. There is another from Microsoft, which you can find on the GotDotNet website.
HTH,
James
Simplicity Rules!
|
|
|
|
|
thank you for your help.
sharon
|
|
|
|
|
I read in my book that I have to implement the functions in MY class... so... why just th´row that damn interface away and just make a method in MY class?!?!?!?
Help me explain it to me!!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
I am not a theory guy myself. So I can't give a comprehensive answer. But interfaces allow a sort of OOP way of multiple inheritance.
Plus they are very useful in remoting. Read my article on remoting [too lazy to dig out the link] where I show how interfaces are useful.
Nish
p.s. I hope someone gives you a more thorough answer
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|