public void Data(string name, string apellido,sum suma) { var sumarTodo = suma(name,apellido); Console.WriteLine("all was reached"); }
// Private methods private void Init() { blocks = GameObject.FindGameObjectWithTag("Blocks").GetComponent <blocks>(); target = GameObject.FindGameObjectWithTag("Target").GetComponent <target>(); sum = GameObject.FindGameObjectWithTag("Sum").GetComponent <sum>(); combo = GameObject.FindGameObjectWithTag("Combo").GetComponent <combo>(); timer = GameObject.FindGameObjectWithTag("Timer").GetComponent <timer>(); lifes_score = GameObject.FindGameObjectWithTag("LifesScore").GetComponent <lifes_score>(); game_over = GameObject.FindGameObjectWithTag("GameOver").GetComponent <game_over>(); stage = GameObject.FindGameObjectWithTag("Stage").GetComponent <stage>(); refresh = GameObject.FindGameObjectWithTag("Refresh").GetComponent <refresh>(); }
static void Main(string[] args) { Console.WriteLine("Write a number that can be used to sum"); int a = int.Parse(Console.ReadLine()); sum obRefernce = new sum(ref a); Sum.sum ob3 = new Sum.sum(); Sum.sum ob = new Sum.sum("Hell", "World"); Sum.sum ob2 = new Sum.sum(2, 4, 5); //out parameter int ans = 0; int SaveAns = 0; sum Obans = new sum(1, 2, out ans, out SaveAns); }
// Start is called before the first frame update void Start() { game_manager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); block_array = gameObject.GetComponentsInChildren <block>(); target = GameObject.FindGameObjectWithTag("Target").GetComponent <target>(); sum = GameObject.FindGameObjectWithTag("Sum").GetComponent <sum>(); combo = GameObject.FindGameObjectWithTag("Combo").GetComponent <combo>(); timer = GameObject.FindGameObjectWithTag("Timer").GetComponent <timer>(); lifes_score = GameObject.FindGameObjectWithTag("LifesScore").GetComponent <lifes_score>(); stage = GameObject.FindGameObjectWithTag("Stage").GetComponent <stage>(); refresh = GameObject.FindGameObjectWithTag("Refresh").GetComponent <refresh>(); swipe = GameObject.FindGameObjectWithTag("Swipe").GetComponent <ParticleSystem>(); audio = gameObject.GetComponent <AudioSource>(); generate_random_numbers(); set_block_clickabable_array(); damage_off(); }
public void Testaequalsb() { var s = new sum(); if (s.x > s.y) { Console.WriteLine("Division is ", s.x / s.y); } else if (s.x < s.y) { Console.WriteLine("Cannot perform division"); } else if (s.x == s.y) { Console.WriteLine("Answer is ", 1); } Assert. }
static void Main(string[] args) { float a, b, sum, sub1, sub2, pro, div1, div2; Console.WriteLine("Введите первое число"); a = float.Parse(Console.ReadLine()); Console.WriteLine("Введите второе число"); b = float.Parse(Console.ReadLine()); a = Math.Abs(a); b = Math.Abs(b); sum sub1 = a - b; sub2 = b - a; pro = a * b; div1 = a / b; div2 = b / a; Console.WriteLine("Сумма модулей:{0}", sum); Console.WriteLine("Разность модуля первого числа и модуля второго числа:{0}", sub1); Console.WriteLine("Разность модуля второго числа и модуля первого числа:{0}", sub2); Console.WriteLine("Произведение модулей:{0}", pro); Console.WriteLine("Частное деления модуля первого числа на модуль второго:{0}", div1); Console.WriteLine("Частное деления модуля второго числа на модуль первого:{0}", div2); }
static void Main(string[] args) { sum s = add; s.Invoke(10, 20); }