Complex.Real 속성

정의

현재 Complex 개체의 실수 구성 요소를 가져옵니다.

public:
 property double Real { double get(); };
public double Real { get; }
member this.Real : double
Public ReadOnly Property Real As Double

속성 값

Double

복소수의 실수 구성 요소입니다.

예제

다음 예제에서는 개체 배열을 인스턴스화하고 각 개체의 Complex 실제 구성 요소와 가상 구성 요소를 + bi 형식으로 표시합니다.

using System;
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex[] values = { new Complex(12.5, -6.3),
                           new Complex(-17.8, 1.7),
                           new Complex(14.4, 8.9) };
      foreach (var value in values)
         Console.WriteLine("{0} + {1}i", value.Real, value.Imaginary);
   }
}
// The example displays the following output:
//       12.5 + -6.3i
//       -17.8 + 1.7i
//       14.4 + 8.9i
Imports System.Numerics

Module Example
   Public Sub Main()
      Dim values() As Complex = { New Complex(12.5, -6.3), 
                                  New Complex(-17.8, 1.7), 
                                  New Complex(14.4, 8.9) }
      For Each value In values
         Console.WriteLine("{0} + {1}i", value.Real, value.Imaginary)
      Next                                   
   End Sub
End Module
' The example displays the following output:
'       12.5 + -6.3i
'       -17.8 + 1.7i
'       14.4 + 8.9i

설명

복소수 +bi가 지정되면 속성은 Real a의 값을 반환합니다.

적용 대상

추가 정보