AspNetCore.Docs/aspnet/whitepapers/what-is-new-in-aspnet-mvc/samples/sample14.cs

6 lines
198 B
C#

Controller c = new MyController();
c.ValueProvider = new ValueProviderDictionary(null) {
{ "example1", "example1Value" },
{ "example2", "example2Value" },
{ "example3", new int[] { 1, 2, 3 } }
};