Advertisement
fcamuso

Untitled

Jul 17th, 2020
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.13 KB | None | 0 0
  1. using System;
  2.  
  3. namespace funzioni2
  4. {
  5.   struct Animazione {
  6.     string dato1;
  7.     string dato2;
  8.  
  9.     double fattoreScala;
  10.     bool canaleAlfa;
  11.     //ecc.
  12.   }
  13.   struct Img {
  14.     public string descrizioneBreve;
  15.     string descrizioneLunga;
  16.  
  17.     byte[] header;
  18.     //ecc.
  19.   }
  20.  
  21.   class Program
  22.   {
  23.  
  24.     static void MinMax1(int[] v, out int posMin, out int posMax, int partiDa=0, int quantiElementi=0)
  25.     {
  26.       posMin = 100;
  27.       posMax = 999;
  28.  
  29.       Console.WriteLine($"partiDa: {partiDa} -- quantiElementi{quantiElementi}");
  30.     }
  31.  
  32.     static Animazione Morph(in Img Partenza, in Img Destinazione)
  33.     {
  34.       Animazione risultato = new Animazione();
  35.       //... istruzioni
  36.      
  37.       //Partenza.descrizioneBreve = NO! VIETATO
  38.  
  39.       return risultato;
  40.     }
  41.  
  42.     static void Main(string[] args)
  43.     {
  44.       //int X = 33, Y = 66;
  45.       //X = Y + (Y = X) * 0;
  46.       //Console.WriteLine($"{X} {Y}");
  47.  
  48.       int posizioneMin; //, posizioneMax;
  49.  
  50.       MinMax1(new int[] { 1, 5, 6, 7 }, out posizioneMin, out _);                    
  51.       Console.WriteLine(posizioneMin);
  52.  
  53.      
  54.  
  55.      
  56.  
  57.     }
  58.   }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement