VB中如何进行复数运算

来源:百度知道 编辑:UC知道 时间:2024/05/04 04:42:38
请举个例子。

VB中复数运算:
Imports System.Math
Imports System.Text.RegularExpressions
Public Class Form1
#Region "复数结构"
Structure Complex
Private Real As Single '设置复数的实数部分
Private TempString As String
Property RealPart() As Single
Get
Return Real
End Get
Set(ByVal value As Single)
Real = value
End Set
End Property
Private Imaginary As Single '设置复数的虚数部分
Property ImaginaryParty() As Single
Get
Return Imaginary
End Get
Set(ByVal value As Single)
Imaginary = value
End Set
End Property
Shadows ReadOnly Property ToString() As String '返回复数的标准形式,如
果没有指定值,返回0
Get
Dim TempReal As String = Real.ToStri