We help IT Professionals succeed at work.
Get Started

Change object properties from get to get ; set

davesnb
davesnb asked
on
453 Views
Last Modified: 2012-08-20
How do I change a property of an object from get only to get; set . Below is the sample code, I wish to change "clientcredentials" to be {get ; set } . Never quite picked up on this concept in powershell101.

$proxy |gm
     TypeName: ReservationInvoiceServiceClient

    Name                    MemberType Definition                                                                                                                                                   
    ----                    ---------- ----------                                                                                                                                                   
    Abort                   Method     System.Void Abort()                                                                                                                                         
    BeginClose              Method     System.IAsyncResult BeginClose(System.AsyncCallback callback, System.Object state), System.IAsyncResult BeginClose(System.TimeSpan timeout, System.AsyncCa...
    BeginOpen               Method     System.IAsyncResult BeginOpen(System.AsyncCallback callback, System.Object state), System.IAsyncResult BeginOpen(System.TimeSpan timeout, System.AsyncCall...
    Close                   Method     System.Void Close(), System.Void Close(System.TimeSpan timeout)                                                                                             
    DisplayInitializationUI Method     System.Void DisplayInitializationUI()                                                                                                                       
    Dispose                 Method     System.Void Dispose()                                                                                                                                       
    EndClose                Method     System.Void EndClose(System.IAsyncResult result)                                                                                                             
    EndOpen                 Method     System.Void EndOpen(System.IAsyncResult result)                                                                                                             
    Equals                  Method     bool Equals(System.Object obj)                                                                                                                               
    GetHashCode             Method     int GetHashCode()                                                                                                                                           
    GetReservation          Method    Company.Product.IWeb.ReservationResponse, 0ofr1eqk, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null GetReservation(Companys.Product.IWeb.Reservatio...
    GetType                 Method     type GetType()                                                                                                                                               
    Open                    Method     System.Void Open(), System.Void Open(System.TimeSpan timeout)                                                                                               
    ToString                Method     string ToString()                                                                                                                                           
    ChannelFactory          Property   System.ServiceModel.ChannelFactory`1[[IReservationInvoiceService, 0ofr1eqk, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] ChannelFactory {get;}   
    ClientCredentials       Property   System.ServiceModel.Description.ClientCredentials ClientCredentials {get;}                                                                                   
    Endpoint                Property   System.ServiceModel.Description.ServiceEndpoint Endpoint {get;}                                                                                             
    InnerChannel            Property   System.ServiceModel.IClientChannel InnerChannel {get;}                                                                                                       
    State                   Property   System.ServiceModel.CommunicationState State {get;}     

Open in new window

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE