Implement Add-Type -MemberDefinition

  $method = 'public string WriteLine() { return "Test"; }'
  Add-Type -MemberDefinition $method -Name "MyType"