Как мне правильно установить Microsoft.Csharp, чтобы я мог использовать динамический типC#

Место общения программистов C#
Ответить
Anonymous
 Как мне правильно установить Microsoft.Csharp, чтобы я мог использовать динамический тип

Сообщение Anonymous »


When I use the dynamics class/type in c# unity, it returns this error: Assets\script\scriptName.cs(477,40): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create';

I tried to download the Microsoft.CSharp.RuntimeBinder, but all the instructions are vague and unclear. P.S. I NEED to use dynamics, because no other way works. (For context of code, System.Reflections do not work, and checking every single possible class would be WAY to unorganised...)

List objectList = new List(); for(var i = 0;i < objectList.Count;i++){ //Following code does not work and returns this error: Assets\script\script.cs(473,40): error CS1061: 'object' does not contain a definition for 'objProperty' and no accessible extension method 'objProperty' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) //objectList.objProperty dynamics dynamicobj = objectList; } Please give me instructions on how to install Microsoft.CSharp, or tell me a better way to do my code!


Источник: https://stackoverflow.com/questions/781 ... namic-type
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»