Skip to content

Guid constant #119

Closed
Closed
@lbargaoanu

Description

@lbargaoanu
var guid = Guid.NewGuid();
var lambda = Expression.Lambda(Expression.Constant(guid));
lambda.ToReadableString().Dump();

I get smth like () => e157dc9e-2e1d-4cfa-8d96-543f84c21fc5. Perhaps most efficient would be to leverage dotnet/roslyn#24621. But new Guid(string) is certainly more readable :)

Metadata

Metadata

Assignees

Labels

bugin-branchA feature or bug fix exists in code, and a release will follow

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions