?
Solved

@object[] { 0 }  Parameter Error in Method

Posted on 2006-05-05
3
Medium Priority
?
302 Views
Last Modified: 2011-10-03
I am receiving the following errors on the following line of code, can some please help??

ERRORS:
The type or namespace name 'object' could not be found (are you missing a using directive or an assembly reference?)

A field initializer cannot reference the nonstatic field, method, or Property

Argument '5': cannot convert from 'object[]' to 'object[] [c:\windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll]'



CODE:
 itemType.InvokeMember(identityField, System.Reflection.BindingFlags.DeclaredOnly | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.SetProperty, null, item, new @object[] { 0 });
0
Comment
Question by:wenyonk
  • 2
3 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 16615850
Did you try this without @ ?
0
 

Author Comment

by:wenyonk
ID: 16616158
no isn't object a C# reserved keyword??
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 750 total points
ID: 16616409
Yes, this is C# keyword, alias for Object. So, what about removing @ sign?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question