Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Value Type vs Ref Type
//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 Test { public struct Struct1{ public int i {get;set;} public Student Student {get;set;} } public void TestMethod(){ Struct1 st1 = new Struct1(); st1.i = 6; st1.Student = new Student(); st1.Student.Name ="Chitresh"; //Your code goes here Console.WriteLine(st1.Student.Name +" "+st1.i); Struct1 st2 = st1; st2.Student.Name ="Nitin"; st2.i =8; Console.WriteLine(st1.Student.Name +" "+st1.i); } } public class Student { public string Name {get;set;} } public class Program { public static void Main(string[] args) { Test t1 = new Test(); t1.TestMethod(); } } }
run
|
edit
|
history
|
help
0
regex
UrlAccess
ö1
Least Common Multiple of 2 or more numbers.
code
sortowania przez wstawienie Correct
compiled prog
Swap numbers without the third variable using the XOR operator
dfgthyjui8u7yt5rewsx
Simple Parallel.For example