Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ByRef
//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 { private static int a = 0; private static int b = 0; private static DateTime dt; public static void Main(string[] args) { bool isThursday = DateTime.Today.DayOfWeek == System.DayOfWeek.Wednesday; if(isThursday) { int x = 5; int y = 5; SetValues(ref x, ref y); DateTime param = DateTime.Today; SetValues(ref param); } Console.WriteLine(dt.ToString("dd MMMM yy")); Console.WriteLine(Sum()); } public static void SetValues(ref int x, ref int y){ a = x; b = y; x = 0; y = 0; // Console.WriteLine("a = {0}, b = {1}", a,b); } public static void SetValues(ref DateTime date) { dt = date; //date = null; } public static int Sum(){ return a + b; } } }
run
|
edit
|
history
|
help
0
zmeika
Abstract Class
Type win
Testing 12
Chest Interaction Unity
Reverse String in for loop
C# programming exercise 2
Helloworld
Fórum ➡ Parallel Threads ( The Funniest Version ) ♦
asxasdxsd