@object[] { 0 }  Parameter Error in Method

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

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]'

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

Expert Comment

ID: 16615850
Did you try this without @ ?

Author Comment

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

Accepted Solution

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

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