Skip to content

Commit

Permalink
Use nameof in a few more places in SAEA
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Jun 14, 2017
1 parent 72f74a6 commit 5fda93d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public IList<ArraySegment<byte>> BufferList
if (_buffer != null)
{
// Can't have both set
throw new ArgumentException(SR.Format(SR.net_ambiguousbuffers, "Buffer"));
throw new ArgumentException(SR.Format(SR.net_ambiguousbuffers, nameof(Buffer)));
}

// Copy the user-provided list into our internal buffer list,
Expand Down Expand Up @@ -304,7 +304,7 @@ private void SetBufferInternal(byte[] buffer, int offset, int count)
// Can't have both Buffer and BufferList.
if (_bufferList != null)
{
throw new ArgumentException(SR.Format(SR.net_ambiguousbuffers, "BufferList"));
throw new ArgumentException(SR.Format(SR.net_ambiguousbuffers, nameof(BufferList)));
}

// Offset and count can't be negative and the
Expand Down Expand Up @@ -484,7 +484,7 @@ internal void StartOperationAccept()
// Caller specified a buffer - see if it is large enough
if (_count < _acceptAddressBufferCount)
{
throw new ArgumentException(SR.Format(SR.net_buffercounttoosmall, "Count"));
throw new ArgumentException(SR.Format(SR.net_buffercounttoosmall, nameof(Count)));
}

// Buffer is already pinned if necessary.
Expand Down

0 comments on commit 5fda93d

Please sign in to comment.