Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get param types for constructor & methods #127

Open
LxLeChat opened this issue Dec 5, 2020 · 0 comments
Open

Get param types for constructor & methods #127

LxLeChat opened this issue Dec 5, 2020 · 0 comments

Comments

@LxLeChat
Copy link
Collaborator

LxLeChat commented Dec 5, 2020

Ok, to get the type of a parameter in a constructor you are doing the following 👍

$Type = $null
# couldn't find another place where the returntype was located. 
# If you know a better place, please update this! I'll pay you beer.
$Type = $Parameter.Extent.Text.Split("$")[0] 

Instead you could do this, wich will give you the type ... \o/ BEER
$Type = $Parameter.StaticType.Name

The same applies to methods !

@LxLeChat LxLeChat changed the title Beer Get param types for constructor & methods Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant