static void processingDoubleArray() { int n; Console.WriteLine("Enter the number of elements in the Double array"); n = InputFromConsole.IsInteger(true); //считываем количество элементов double[] doubArray = Arrays.CreateDoubleArray(n, n, false, true); //создаем массив MaxElement.Max(doubArray, true); //определяем и выводим максимальный элемент Arrays.QSort.Start(ref doubArray, 0, n - 1); //сортируем массив for (int i = 0; i < n; i++) //выводим массив { Console.Write($"{doubArray[i]:F4} "); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ParameterDefinition; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (NameElement != null) { dest.NameElement = (Hl7.Fhir.Model.Code)NameElement.DeepCopy(); } if (UseElement != null) { dest.UseElement = (Code <Hl7.Fhir.Model.OperationParameterUse>)UseElement.DeepCopy(); } if (MinElement != null) { dest.MinElement = (Hl7.Fhir.Model.Integer)MinElement.DeepCopy(); } if (MaxElement != null) { dest.MaxElement = (Hl7.Fhir.Model.FhirString)MaxElement.DeepCopy(); } if (DocumentationElement != null) { dest.DocumentationElement = (Hl7.Fhir.Model.FhirString)DocumentationElement.DeepCopy(); } if (TypeElement != null) { dest.TypeElement = (Code <Hl7.Fhir.Model.FHIRAllTypes>)TypeElement.DeepCopy(); } if (ProfileElement != null) { dest.ProfileElement = (Hl7.Fhir.Model.Canonical)ProfileElement.DeepCopy(); } return(dest); }
public void MaxElement_ArrayIsNull_ArgumentNullException() => Assert.Throws(typeof(ArgumentNullException), () => MaxElement.SearchMaxElement(null));
public int?MaxElement_ValidData_ValidResult(int[] array) => MaxElement.SearchMaxElement(array);