View Single Post
  #47  
Old 12-06-2011, 09:41 AM
Octocat Octocat is offline
Approved Member
 
Join Date: Dec 2011
Posts: 22
Default

You can declare a function as:

private void sendScreenMessageTo(int army, string msg, params object[] parms)

then array for the parameters will be generated automatically, the call will be easier to look:

sendScreenMessageTo(myarmy, "I am at grid {0}, {1}", xpos, ypos);


Also, lowercase first letter in class or function name is Java style, not C#. Microsoft C# Code Design Guidelines.
Reply With Quote