UseDefaultCredentials property

bool UseDefaultCredentials
Gets or sets a value indicating whether the credentials of the user currently logged into Windows should be used to authenticate with the Exchange Web Services. Setting UseDefaultCredentials to true automatically sets the Credentials property to null.

Implementation

bool get UseDefaultCredentials => this._useDefaultCredentials;
void UseDefaultCredentials=(bool value)

Implementation

set UseDefaultCredentials(bool value) {
  this._useDefaultCredentials = value;

  if (value) {
    this._credentials = null;
    this._cookieContainer = new http
        .CookieContainer(); // Changing credentials resets the Cookie container
  }
}