Created
September 18, 2018 06:11
-
-
Save TheAlphamerc/b52930e20dbbc9f4d8d58bf72a1bcd03 to your computer and use it in GitHub Desktop.
Code to return database path xamarin android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Code to return database path xamarin android | |
/// </summary> | |
/// <returns>String path</returns> | |
public string DatabasePath() | |
{ | |
var fileName = "AdvantageDb.db3"; | |
var path = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), fileName); | |
if (!File.Exists(path)) | |
{ | |
File.Create(path).Dispose(); | |
} | |
return path; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment