Using Tuples in a Visio Add-in

Started by Visisthebest, January 27, 2022, 11:52:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visisthebest

I currently use structs or objects but I see that from .NET Framework 4.7 Tuples are also supported for returning multiple values from functions.

https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/data-types/tuples

Is it wise to use Tuples, I did read VB.NET Tuples aren't really completely immutable, or might this give issues on Visio installations, I have no clear picture of which .NET Framework versions are used on Office on most machines.

How does a Visio add-in mingle with another add-in that uses another .Net Framework 3.5 or 4.x version, do the add-in developers have some idea about best practices in this regard. (I don't aim for 100% but supporting 90% of actively used PC's out there would be nice). Thank you for sharing your insights!
Visio 2021 Professional

Paul Herber

I see no reason why tuples shouldn't be used with your .NET code, but the Visio API hasn't changed as far as I know so your Visio interfacing won't change.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Visisthebest

Thank you Paul, more specifically my concern is if other Visio add-ins use an older version of .NET Framework and my add-in uses 4.7+ only, could this cause issues with the add-ins running on the same PC?
Visio 2021 Professional

Paul Herber

I don't think that matters, you could have n programs/add-ins running all specifying different .NET versions, it all sorts itself out.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Nikolay

From what I know, your application either will run properly, or will not start at all if the installed version of the .NET runtime is not suitable.
So, there is no point in worrying about tuples specifically, IMHO.