Created
February 17, 2015 00:46
-
-
Save JoshVarty/84449b720d9caa220922 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nameOfExpression = SyntaxFactory.LocalDeclarationStatement( | |
SyntaxFactory.VariableDeclaration( | |
SyntaxFactory.PredefinedType( | |
SyntaxFactory.Token( | |
SyntaxKind.StringKeyword))) | |
.WithVariables( | |
SyntaxFactory.SingletonSeparatedList<VariableDeclaratorSyntax>( | |
SyntaxFactory.VariableDeclarator( | |
SyntaxFactory.Identifier( | |
@"result")) | |
.WithInitializer( | |
SyntaxFactory.EqualsValueClause( | |
SyntaxFactory.InvocationExpression( | |
SyntaxFactory.IdentifierName( | |
@"nameof")) | |
.WithArgumentList( | |
SyntaxFactory.ArgumentList( | |
SyntaxFactory.SingletonSeparatedList<ArgumentSyntax>( | |
SyntaxFactory.Argument( | |
SyntaxFactory.IdentifierName( | |
@"result")))))))))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment