MCQs > IT & Programming > C# > Which of the following code samples will read an integer from a byte[]?

C# MCQs

Which of the following code samples will read an integer from a byte[]?

Answer

Correct Answer: byte[] bytes = { 0, 0, 0, 25 }; if (BitConverter.IsLittleEndian) Array.Reverse(bytes); int i = BitConverter.ToInt32(bytes, 0); Console.WriteLine("int: {0}", i);

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it