Change property object to another object

NachitoMax 411 Reputation points
2022-11-17T22:06:23.67+00:00

Hi

Apologies for a potential poor title, not entirely sure how to describe it... Here is an example-

If i declare a property or Dim as an object like

Private Property MainReport As Report1  

Is there a way to change it to another report object but keep the same Property name?

MainReport = Report2  

Thanks

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,404 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,125 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 26,671 Reputation points Microsoft Vendor
    2022-11-18T05:40:10.227+00:00

    Hi @NachitoMax ,
    You can find those classes that can be converted to each other from the links below.
    Type conversion in .NET
    What is the relationship between Report1 and Report2?
    Best Regards.
    Jiachen Li

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments