In Xamarin.Forms - What is the accurate technique to store value like Session?

Jerry Lipan 916 Reputation points
2021-12-12T02:18:46.17+00:00

Hi,

I'm a Xamarin Newbies. What is the accurate technique to store value like Session? Then, this value we can retrieve back at any form?

Please help

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,262 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lex Li (Microsoft) 4,247 Reputation points Microsoft Employee
    2021-12-12T07:07:25.177+00:00

    As IoC is available there, you can simply define your own configuration class and then drop an object of it to the IoC container. Then anywhere else you can query the configuration from IoC.

    You can even implement more complicated per environment configuration https://medium.com/@benjamintodts/cross-platform-environment-aware-configuration-files-in-xamarin-232e7d5ddd80

    The technique though is universal and not limited to Xamarin.

    0 comments No comments

0 additional answers

Sort by: Most helpful