小编son*_*ny5的帖子

Foreach重复内在价值......这个应该很容易!

float [] pt1x = {0.580f, 0.680f, 0.780f}; 
float [] pt1y = {1.128f, 1.228f, 1.328f}; 

foreach (float xpt in pt1x) {
   System.Console.WriteLine("xpt = " + xpt);
       foreach (float ypt in pt1y) {
        System.Console.WriteLine("ypt = " + ypt);
      }  
}

------my output:
xpt = 0.58
ypt = 1.128
ypt = 1.228
ypt = 1.328
xpt = 0.68
ypt = 1.128
ypt = 1.228
ypt = 1.328
xpt = 0.78
ypt = 1.128
ypt = 1.228
ypt = 1.328
---------------here is what I …
Run Code Online (Sandbox Code Playgroud)

c#

1
推荐指数
1
解决办法
387
查看次数

不返回传递的值

// here is the full code.
// I would expect the btnLine_Click() method to start the timer (which it does) and then 
// accept "angle" from the "public float myangle" getter but it does not. So it only draws // one 30 degree hard coded  line.  I desire the line to be incremented around in 10
// degree steps sort of like the second hands of a clock.

using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms; …

c#

-1
推荐指数
1
解决办法
253
查看次数

标签 统计

c# ×2