MCPcopy Create free account
hub / github.com/NodeRT/NodeRT / TypeToString

Method TypeToString

src/NodeRTLib/Reflector.cs:342–355  ·  view source on GitHub ↗

http://stackoverflow.com/a/1363212/1060807

(Type type)

Source from the content-addressed store, hash-verified

340
341 // http://stackoverflow.com/a/1363212/1060807
342 public static string TypeToString(Type type)
343 {
344 if (type == null) throw new ArgumentNullException("type");
345
346 var sb = new StringBuilder();
347 using (var sw = new StringWriter(sb))
348 {
349 var expr = new CodeTypeReferenceExpression(type);
350 var prov = new CSharpCodeProvider();
351
352 prov.GenerateCodeFromExpression(expr, sw, new CodeGeneratorOptions());
353 }
354 return sb.ToString();
355 }
356
357 readonly static Dictionary<String, String> CSharpToCppMethodMap = new Dictionary<string, string>()
358 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected