System.Text.UTF32Encoding.GetByteCount C# (CSharp) Method

GetByteCount() private method

private GetByteCount ( char chars, int count ) : int
chars char
count int
return int
        public unsafe override int GetByteCount(char* chars, int count)
        {
            throw null;
        }

Same methods

UTF32Encoding::GetByteCount ( char chars, int index, int count ) : int
UTF32Encoding::GetByteCount ( string s ) : int

Usage Example

		[Category ("NotDotNet")] // A1/B1 return 24 on MS
		public void GetByteCount2 ()
		{
			string s = "za\u0306\u01FD\u03B2\uD8FF\uDCFF";

			UTF32Encoding le = new UTF32Encoding (false, true);
			Assert.AreEqual (28, le.GetByteCount (s), "#A1");
			Assert.AreEqual (0, le.GetByteCount (string.Empty), "#A2");

			UTF32Encoding be = new UTF32Encoding (true, true);
			Assert.AreEqual (28, be.GetByteCount (s), "#B1");
			Assert.AreEqual (0, be.GetByteCount (string.Empty), "#B2");
		}
All Usage Examples Of System.Text.UTF32Encoding::GetByteCount