Last active
June 6, 2016 12:34
-
-
Save Phuseos/dd9f3a15b04b0a154dddefa4c09b1473 to your computer and use it in GitHub Desktop.
Loop through an array and print the values (C#)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Simple little loop that prints the dynamic values of the following decimals | |
public static decimal DeciValueOne { get; set; } | |
public static decimal DeciValueTwo { get; set; } | |
void GetArrayValue() { | |
decimal[] ItemsToNone = new decimal[] { DeciValueOne, DeciValueTwo }; //Declare array | |
for (int i = 0; i < ItemsToNone.Length; i++) //Loop over the arrays | |
{ | |
Debug.WriteLine(ItemsToNone.GetValue(i)); //Print out the values | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment