Skip to main content

ToCodeStringExtensions

Provides ToCodeString() for collections of IToCodeString objects.

public static class ToCodeStringExtensions

Inheritance ObjectToCodeStringExtensions

Methods

ToCodeString<T>(IReadOnlyList<T>, Boolean, Int32)

Returns a string containing C# code to create this set as a List. Useful to copy and paste from a debugger into another test or notebook for further investigation.

public static string ToCodeString<T>(IReadOnlyList<T> source, bool formatted, int indentation)

Type Parameters

T

Parameters

source IReadOnlyList<T>

formatted Boolean

indentation Int32

Returns

String