Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Global Properties?
Message
De
18/04/2004 12:08:23
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
18/04/2004 11:14:39
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00895917
Message ID:
00895939
Vues:
23
Thanks Bonnie and Kevin, but Iwas finally able to get it working. It indeed was the fully qualifying name when referencing the structure.



>John,
>
>Forget my last reply ... you can't specify static for struct. Your code looks good, nothing obvious jumps out at me ... it should be working. I thought maybe the struct wouldn't work correctly in the watch window (as some things don't), but that's not the case ... I tried it, it's fine. Are you fully qualifying the struct when you view it in the watch window?
>
>AppStartUp.AppDefaults.server
>
>
>~~Bonnie
>
>>I changed my storage to a struct after I posted the question this morning. However, given the following code, any attemp to access the struct's members gives me an "out of scope" error when attempting to view in the watch window.
>>
>>
>>
>>
>>using System;
>>using AMS.Profile;
>>
>>
>>namespace OrderPro
>>{
>>	/// <summary>
>>	/// Summary description for AppStartUp.
>>	/// </summary>
>>	public class AppStartUp
>>	{
>>		public AppStartUp()
>>		{
>>			//
>>			// TODO: Add constructor logic here
>>			//
>>		}
>>
>>		public struct AppDefaults
>>		{
>>			public static string server = "";
>>			public static string dataBase = "";
>>			
>>			public static string adminPath = "";
>>			public static string sqlConn = "";		
>>		}
>>
>>		public static void SetAppDefaults()
>>		{
>>			Registry profile = new Registry();
>>			AppDefaults.server = profile.GetValue("DBSettings","DBServer","");
>>			AppDefaults.dataBase = profile.GetValue("DBSettings","DBName","");
>>			
>>			AppDefaults.adminPath = "c:\vsdevelop";
>>			AppDefaults.sqlConn = "SERVER=" + AppDefaults.server.ToUpper().Trim() + ";UID=uid;PWD=pwd;DATABASE=database";
>>		}
>>		
>>		public static void LoadProgramSettings()
>>		{
>>			SetAppDefaults();
>>		}
>>	}
>>}
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform