Wednesday, 31 July 2024

interview at techsoloutions

 When processing thousands of data items in a .NET API, which method will you choose in terms of balancing performance and resource usage most efficiently ? 

foreach (var item in data) { 

 ProcessItem(item); } Parallel.ForEach(data, item => { ProcessItem(item); }); foreach (var item in data) { await Task.Run(() => ProcessItem(item)); } await Task.WhenAll(data.Select(item => Task.Run(() => ProcessItem(item)



2.reverse a string without reverse


3.state management

No comments:

Post a Comment

Car pooling app

 I'll create a car pooling app with real-time vehicle tracking, pickup/drop time estimates, and a list of onboard users. Since we don...