Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

please explain this behavior

$
0
0

I'm learning PowerShell and found something that doesn't make sense will the little knowledge I have for now.

I wish to see the static members of math, so I tried this

 [math] | gm

this gave me: TypeName : System.RuntimeType

so I thought: duh, I forgot static

so I tried this

[math] | gm -static

and now I can see all the math static methods I can use, which is what I was looking for.

but I do not understand why gm will retunr a different type object if static is used or not. can someone please tell me why the objects are different?

thank you!


Viewing all articles
Browse latest Browse all 6937

Trending Articles