DLR interop for F# -- works like dynamic keyword in C#
F# C# Shell CSS JavaScript
Switch branches/tags
Clone or download
jbtule Merge pull request #19 from fsprojects/more-coverage
Add coverage for field  and obsolete methods
Latest commit f9a3d4f Jun 7, 2018


Issue Stats Issue Stats

FSharp.Interop.Dynamic NuGet Status

F# Dynamic Operator using the DLR .net Std 1.6, .net 4.0, & (Portable Class Library WinRT, .NET 4.5, Silverlight 5)

Install from nuget

PM> Install-Package FSharp.Interop.Dynamic

Build Status

Platofrm Status
Windows Build status
Mac Build Status
Linux Build Status
Coverage codecov Coverage Status

Bleeding edge feed MyGet

MyGet Pre Release


target?Property, target?Property<-value, and target?Method(arg,arg2) allow you to dynamically get/set properties and call methods

Also Dyn.implicitConvert,Dyn.explicitConvert, comparison operators and more.



open FSharp.Interop.Dynamic
let ex1 = ExpandoObject()
ex1?Test<-"Hi"//Set Dynamic Property
ex1?Test //Get Dynamic


open FSharp.Interop.Dynamic
type MyHub =
    inherit Hub
    member x.Send (name : string) (message : string) =
        base.Clients.All?addMessage(name,message) |> ignore

MVC ViewBag



The dlr is incompatible with interface explicit members, so are these operators, just like C#'s dynamic keyword.

.net core 2.0.0 has a major bug in the c# dynamic keyword with nested classes inside of generic classes. You will know it from a substring argument length exception. .net 4.0, .net core 1.X & .net core 2.0.3<= are okay.


The default maintainer account for projects under "fsprojects" is @fsprojectsgit - F# Community Project Incubation Space (repo management)