I am Facing a problem in Word.Document.SaveAs(,)
It Shows Error "No overload for method 'SaveAs' takes '11' arguments"
when I run application on OTHER MACHINE which also using Office2003.
Same Applicaiton works On My machine with 16 arguments
Have you checked you are supplying 16 arguments? Beacuse the error says 11, and the compiler can normally count pretty well...
BTW: when I have to supply lots of arguments to a method, I tend to put them each on a separate line - it make identifying which is which a lot easier, and you can also comment them:
Ah! So you created an application on one pc, and moved the .EXE file to another. When you run the application on the second PC, you get a run time exception "System.MissingMethodException: Method not found" or similar? Is this the correct sequence of events?
Have you installed Word on the second PC, and is it the same version?
Did you copy the EXE with a proper setup, or what?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
is there a way to do this in c#, i knew a way in c++, but all my searches have come to nothing, basically i am string the type of the class i am using in an xml file and trying to setup the exact type of class from the information stored in the xml file.
There has to be a way to do this as the xmlserialiser is able to do it/
Well, if I understood correctly what you need, the xml serializer is able to create a class from an xml document, but you need to know the class type.
If you have the class type name in a string, you can use Type.GetType to get the corresponding type object.
yeah i know that i am makin my own custom class serialiser, and am already referencing the GetType method from the class, what i weant to do is when i read the xml file and get the class type is to initialise the class from the class type (confusing i know)
i still don't think you understand what i mean, oh well my fault, i found a way to to do it eventually, if you use Activator you can initialise an object of any class type by passing in the Type into the CreateInstance method like this:
just PRE tags will do, it does not make sense to nest CODE and PRE tags; it may have had some use long ago, it does not today.
Luc Pattyn Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you. Local announcement (Antwerp region): Lange Wapper? Neen!
My guess is that you have a number in textBox3 that is less than zero or equal to or greater than the .Count of your "silici" List. If you try to remove something at an index that doesn't exist the ArgumentOutOfRangeException is thrown. What is the value of "silineceksirasi" when you reach the silici.RemoveAt(silineceksirasi); statement? Make sure it's not equal or greater than the List.Count. Good luck!
silici.RemoveAt(silineceksirasi); ----> I GET MİSTAKE WHEN ı CLİCK BUTTON3!!!
Lets look closer at the List<(Of <(T>)>).RemoveAt Method method:
// Syntax publicvoid RemoveAt(
Exception Condition ArgumentOutOfRangeException index is less than 0.
index is equal to or greater than Count.
ArgumentOutOfRangeException is thrown when a method is invoked and at least one of the arguments passed to the method is not
nullNothingnullptra null reference (Nothing in Visual Basic) and does not contain a valid value.
The only programmers that are better C# programmers, are those who look like this ->
But if I read your code correctly (and I'm sorry, but it's a bit hard when you don't use the pre tags and have chosen names that doesn't make any sense if you don't speak turkish(?)) this is what happens when you click button3:
1. You create a new bt object.
2. You call the silgi method on that object.
At this point your bt object's member silici does not contain any items. It's just an empty List and when you try to remove an item from that empty list you get the exception thrown.
I think you need to do some reading when it comes to objects and the creation of new objects. Are you sure you want to create 3 different buton objects, or is your intention to create one bt object and add things to its "silici" List?
i am really pleased for your help and thanks for your assistance . moreover, i am new on C# and i will be more clear in my question in the future and that is right i need some reading. and i will not use turkish word in the future
No worries, and you'll be doing yourself a big favour if you learn a bit about this.
Check OriginalGriff's posting below - that should really get you started in understanding what you need to do to make things work. Good luck!