none
Dynamic namespace could not be found. RRS feed

  • Question

  • The type or namespace name 'dynamic' could not be found. Are you missing a using directive or an assembly reference?
    Monday, April 13, 2015 12:57 PM

Answers

  • Hello Rutvik,

    Please check this link and if you are using a proper version Visual Studio:https://msdn.microsoft.com/en-us/library/dd264736.aspx?f=255&MSPPError=-2147217396:

    Visual C# 2010 introduces a new type, dynamic. The type is a static type, but an object of type dynamicbypasses static type checking. In most cases, it functions like it has type object. At compile time, an element that is typed as dynamicis assumed to support any operation. Therefore, you do not have to be concerned about whether the object gets its value from a COM API, from a dynamic language such as IronPython, from the HTML Document Object Model (DOM), from reflection, or from somewhere else in the program. However, if the code is not valid, errors are caught at run time.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, April 22, 2015 12:03 PM
    Moderator

All replies

  • What version of .NET are you targetting? The dynamic keyword was only introduced in .NET 4.
    Monday, April 13, 2015 1:03 PM
  • It's a C# 2012 keyword - unless you're using Visual Studio 2012 or higher you won't be able to use it. (Note: the .NET framework target is irrelevant).

    Convert between VB, C#, C++, & Java (http://www.tangiblesoftwaresolutions.com)
    Instant C# - VB to C# Converter
    Instant VB - C# to VB Converter


    Monday, April 13, 2015 2:18 PM
  • Hello Rutvik,

    Please check this link and if you are using a proper version Visual Studio:https://msdn.microsoft.com/en-us/library/dd264736.aspx?f=255&MSPPError=-2147217396:

    Visual C# 2010 introduces a new type, dynamic. The type is a static type, but an object of type dynamicbypasses static type checking. In most cases, it functions like it has type object. At compile time, an element that is typed as dynamicis assumed to support any operation. Therefore, you do not have to be concerned about whether the object gets its value from a COM API, from a dynamic language such as IronPython, from the HTML Document Object Model (DOM), from reflection, or from somewhere else in the program. However, if the code is not valid, errors are caught at run time.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, April 22, 2015 12:03 PM
    Moderator