Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- testClass[] testArray = new testClass[8];
- testArray[4] = new testClass();
- testArray[4].value = 2.0f;
- testClass temporary = null;
- foreach (testClass testme in testArray)
- {
- if (testme != null)
- {
- temporary = testme;
- }
- }
- Console.Write(temporary.value);
- }
- }
- class testClass
- {
- public float value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement