Hi, I'm not part of the dotnet-csharp team, but I know a bit about C#, so I can explain the issue here. There are 2 issues with your code.
The reason .Add isn't recognized is because you need to add "using System.Linq;" at the top of your file.
To get a string value from a dynamic object the syntax is: (string)v.GetType().GetProperty("coder").GetValue(v, null)
A working example of a console app with this code would look like this:
using System;
using System.Collections.Generic;
using System.Linq;
namespace Foo
{
class Program
{
public static void Main(string[] args)
{
AddFoo();
}
public static void AddFoo()
{
List<object> foo = new List<object>();
dynamic bar = new { coder = "", designer = "" };
if (foo.Any(v => (string)v.GetType().GetProperty("coder").GetValue(v, null) == bar.coder) == false)
{
foo.Add(bar);
}
}
}
}