diff --git a/csharp/ProtocolBuffers/ByteString.cs b/csharp/ProtocolBuffers/ByteString.cs index 13b9c159..26816d9c 100644 --- a/csharp/ProtocolBuffers/ByteString.cs +++ b/csharp/ProtocolBuffers/ByteString.cs @@ -1,4 +1,7 @@ -// Protocol Buffers - Google's data interchange format +using System; +using System.Collections; +using System.Collections.Generic; +// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. // http://code.google.com/p/protobuf/ // @@ -14,9 +17,6 @@ // See the License for the specific language governing permissions and // limitations under the License. using System.Text; -using System; -using System.Collections.Generic; -using System.Collections; namespace Google.ProtocolBuffers { /// @@ -27,7 +27,7 @@ namespace Google.ProtocolBuffers { private static readonly ByteString empty = new ByteString(new byte[0]); - private byte[] bytes; + private readonly byte[] bytes; /// /// Constructs a new ByteString from the given byte array. The array is @@ -124,7 +124,7 @@ namespace Google.ProtocolBuffers { return CodedInputStream.CreateInstance(bytes); } - // TODO(jonskeet): CopyTo, Equals, GetHashCode if they turn out to be required + // TODO(jonskeet): CopyTo if it turns out to be required public override bool Equals(object obj) { ByteString other = obj as ByteString; diff --git a/csharp/ProtocolBuffers/GeneratedBuilder.cs b/csharp/ProtocolBuffers/GeneratedBuilder.cs index a1c59e89..4f577a79 100644 --- a/csharp/ProtocolBuffers/GeneratedBuilder.cs +++ b/csharp/ProtocolBuffers/GeneratedBuilder.cs @@ -151,7 +151,6 @@ namespace Google.ProtocolBuffers { /// /// Like Build(), but will wrap UninitializedMessageException in /// InvalidProtocolBufferException. - /// TODO(jonskeet): This used to be generated for each class. Find out why. /// public TMessage BuildParsed() { if (!IsInitialized) { @@ -162,7 +161,6 @@ namespace Google.ProtocolBuffers { /// /// Implementation of . - /// TODO(jonskeet): This used to be generated for each class. Find out why. /// public override TMessage Build() { if (!IsInitialized) {