SoFunction
Updated on 2025-03-07

C# base64 encoding method for binary data

This article describes the method of base64 encoding of binary data in C#. Share it for your reference. The specific implementation method is as follows:

using System;
using ;
static class MyModClass
{
 public static string Base64EncodeBytes(this byte[] inBytes)
 {
  return (Convert.ToBase64String(inBytes));
 }
}

I hope this article will be helpful to everyone's C# programming.