Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want create my biginteger class. But i can't get my biginteger value directly. What can i do?

image link :big — imgbb.com[^]

What I have tried:

Imports System.Numerics

Public Class myBig

    Private Property _Biginteger As BigInteger

    Public Property Biginteger
        Get
            Return _Biginteger
        End Get
        Set(value)
            _Biginteger = value
        End Set
    End Property

    Public Sub New(Bytes As Byte())
        Biginteger = New BigInteger(Bytes)
    End Sub

End Class
Posted
Updated 19-Oct-18 5:52am

1 solution

The Biginteger property is part of your myBig class: To access it, you need to use the name of the property:
VB
Dim Big2 As New myBig(Bytes)
Dim bi As BigInteger = Big2.Biginteger
To view it in the debugger, click the little arrow to the left of the variable name.
 
Share this answer
 
Comments
gacar 19-Oct-18 12:00pm    
Thanks for solution. Yes i know this but i want use mybig class like as biginteger class. Cannot posible this? E.g, inherit biginteger class into my class.
OriginalGriff 19-Oct-18 12:08pm    
No - BigInteger is not a class, it's a struct - and they are automatically sealed (c# term) or NotInheritable (VB term) so you cannot inherit from it. Encapsulation is your only route!
gacar 19-Oct-18 12:14pm    
Understand. Thanks.
OriginalGriff 19-Oct-18 12:15pm    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900