[FxCop.设计规则]6. 避免使用输出参数[9]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 cajon 的 blog

         foreach(typeoffeedback t in enum.getvalues(typeof(typeoffeedback)))
         {
            // the call to the library.
            disposition[i] = badrefandout.replyinformation(
               t, out reply[i], ref action[i]);
            console.writeline("reply: {0} action: {1}  return? {2} ", 
               reply[i], action[i], disposition[i]);
            i++;
         }
      }

 

      static void usethesimplifiedclass()
      {
         replydata[] answer = new replydata[5];
         int i = 0;
         foreach(typeoffeedback t in enum.getvalues(typeof(typeoffeedback)))
         {
            // the call to the library.
            answer[i] = redesignedrefandout.replyinformation(t);
            console.writeline(answer[i++]);
         }
      }

 

本文关键:[FxCop.设计规则]6. 避免使用输出参数
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top