Skip to content

Add use static <class> usage to allow static member access in PowerShell #5099

@markekraus

Description

@markekraus

Reference: #3603

Proposal is to add usage to the using statement to allow for ease of access to static members of classes.

one possible syntax:

using static System.Math

$b  = Pow(1024, 2)

This issue is open to discuss possible implementations, issues concerns, use cases, yays and nays.

Questions: Methods only? All members? syntax? support for PowerShell v5+ user defined classes? precedence?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifIssue-Enhancementthe issue is more of a feature request than a bugKeepOpenThe bot will ignore these and not auto-closeWG-Languageparser, language semantics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions