static void Main(string[] args) { getdepth gd = new getdepth(); gd.DataReceived += Gd_DataReceived; dc = new DepthClient(424, 512); dc.InitCLients(); while (true) { Console.WriteLine(dc.Recieve().Length); } }