Partilhar via


RunAsPermission.newmethod(String) Method

Definition

Initializes a new instance of the CodeAccessPermission class.

public:
 void newmethod(System::String ^ _userId);
public void newmethod (string _userId);
override this.newmethod : string -> unit
Public Sub newmethod (_userId As String)

Parameters

_userId
String

A userId system data type that specifies an Finance and Operations user.

Remarks

The following example shows a new instance of the RunAsPermission class. The SysUserInfo table is used to initialize the userId parameter.

server static void main(Args args) 
{ 
    RunAsPermission _perm; 
    UserId          _userId; 
    SysUserInfo     _userInfo; 
    _userInfo = SysUserInfo::find(); 
    _userId = _userInfo.Id; 
    _perm = new RunAsPermission(_userId); 
}

Applies to