コード例 #1
0
 public static char GetFieldSymbol(TestTargetClass target, int index)
 {
     try
     {
         if (index < target.classField2.Length)
         {
             return(target.classField2[index]);
         }
         return('\n');
     }
     finally
     {
     }
 }
コード例 #2
0
        static void Main(string[] args)
        {
            List <TestTargetClass> targetsList = new List <TestTargetClass>()
            {
                new TestTargetClass(), new TestTargetClass(15, "stringParam")
            };

            for (int i = 0; i < targetsList.Count; i++)
            {
                int temp = 10 + i * 20;
                targetsList[i].SetFields(ref temp, "newStringParam" + i);
                targetsList[i].GetFields();
                TestTargetClass.GetFieldSymbol(targetsList[i], i * 20);
            }
        }