Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Linq
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int[] nums = { 1, -2, 3, 0, -4, 5 }; // Create a query that obtains only positive numbers. var posNums = from n in nums where n > 0 select n; Console.Write("The positive values in nums: "); // Execute the query and display the results. foreach(int i in posNums) Console.Write(i + " "); Console.WriteLine(); Console.WriteLine("\nSetting nums[1] to 99."); nums[1] = 99; Console.Write("The positive values in nums after change: "); // Execute the query a second time. foreach(int i in posNums) Console.Write(i + " "); Console.WriteLine(); } } }
run
|
edit
|
history
|
help
0
Can a == true && a == false be true in C#?
Merge two array
Watch Jurassic World Dominion Online Free
Contraseña final
Jai
X o X
Xml in C#
tester of xpath
transform string to hex code
int-float C# division