ภาพรวม อาร์เรย์ใน C# มีคุณสมบัติ SyncRoot (มาจาก ICollection) ใช้ร่วมกับ lock เพื่อให้การเข้าถึงอาร์เรย์เป็น thread-safe ตัวอย่างที่ 1: อาร์เรย์จำนวนเต็ม using System; public class Demo { public static void Main() { Array intArr = new int[] { 5, 10, 15, 20, 25, 30, 35, 40 };