samedi 26 janvier 2019

Definition of a variable load and its permanent use

I have to force these variables to rebuild on every one I want to use, which makes me hard. I need to create a class to define these variables and use them in the entire program. . How can i do that ?????

string RootFolderName = "Uplaod";
string ProductPictureFolder = "ProductPictureFolder";
string ProductMainPictureFolder = "ProductMainPicture";
string WebRootPath = _hostingEnvironment.WebRootPath;
string RootPath = Path.Combine(WebRootPath, RootFolderName);
string ProductPicturePath = Path.Combine(WebRootPath, RootFolderName, ProductPictureFolder);
string ProductMainPicturePath = Path.Combine(WebRootPath, RootFolderName, ProductPictureFolder, ProductMainPictureFolder);
string newPath = Path.Combine(WebRootPath, ProductMainPicturePath);

Aucun commentaire:

Enregistrer un commentaire