you fooled yourself by using a lot of redundant brackets. The compiler doesn't mind, but you lost track of what is inside the inner for loop and what isn't.
Once you fix the problem, you'll find out you're not there yet, as Write() or WriteLine() will use whatever number of positions is required to represent the number, so the table may well be badly aligned. If so, start looking at some overloads of int.ToString().
In your variable declarations, change "ManagementQuery" to "ObjectQuery". You cannot declare an instance variable as an abstract class type and then start calling methods and setting properties on it as the abstract class won't have implementations of those properties and methods.
Hi Dave and Richard, thank you for checking my code.
Richard yes that is error I’m getting and thank you trying Dave.
I’m stuck and will have to check Microsoft links tomorrow at work like I said it is my first time and I’m stuck and don’t understand.
Dave since you tried and saw the errors would you be kind to highlight where I’m going wrong so that I can learn from please but if you think it’s better to read the links then I would do that but if I’m not mistaken I got some of the code from Microsoft to understand and I tried but without success.
The image you have posted is not viewable and cannot be downloaded without creating a Mediafire account. Please post the actual code in your original question and explain what the error is and where it occurs.
all the code I copied from microsoft company, even the top of the page I posted without you reading my first questions, now you give the same link from microsoft company. Before you criticize others, have you tried my example ?