diff options
Diffstat (limited to 'src/ProtocolBuffers/ByteString.cs')
-rw-r--r-- | src/ProtocolBuffers/ByteString.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ProtocolBuffers/ByteString.cs b/src/ProtocolBuffers/ByteString.cs index 83d4a2df..e645a9f2 100644 --- a/src/ProtocolBuffers/ByteString.cs +++ b/src/ProtocolBuffers/ByteString.cs @@ -91,7 +91,12 @@ namespace Google.ProtocolBuffers public byte[] ToByteArray()
{
- return (byte[]) bytes.Clone();
+ return (byte[])bytes.Clone();
+ }
+
+ public string ToBase64()
+ {
+ return Convert.ToBase64String(bytes);
}
/// <summary>
|