当前位置: 首页>>代码示例>>C#>>正文


C# StringDictionary.TryGetValue方法代码示例

本文整理汇总了C#中StringDictionary.TryGetValue方法的典型用法代码示例。如果您正苦于以下问题:C# StringDictionary.TryGetValue方法的具体用法?C# StringDictionary.TryGetValue怎么用?C# StringDictionary.TryGetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StringDictionary的用法示例。


在下文中一共展示了StringDictionary.TryGetValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ResolveStrings

		public void ResolveStrings(StringDictionary StringResources, bool RaiseChangedEvent)
        {
            string skill_name;
            string skill_description;

			StringResources.TryGetValue(skillNameID, out skill_name);
			StringResources.TryGetValue(skillDescriptionID, out skill_description);

            if (RaiseChangedEvent)
            {
                if (skill_name != null) SkillName = skill_name;
                else SkillName = String.Empty;

                if (skill_description != null) SkillDescription = skill_description;
                else SkillDescription = String.Empty;
            }
            else
            {
                if (skill_name != null) skillName = skill_name;
                else skillName = String.Empty;

                if (skill_description != null) skillDescription = skill_description;
                else skillDescription = String.Empty;
            }
        }
开发者ID:GJiin,项目名称:meridian59-dotnet,代码行数:25,代码来源:AvatarCreatorSkillObject.cs

示例2: ResolveStrings

		public void ResolveStrings(StringDictionary StringResources, bool RaiseChangedEvent)
        {
            string res_name;
            string res_mainoverlayname;

			StringResources.TryGetValue(nameRID, out res_name);
			StringResources.TryGetValue(overlayFileRID, out res_mainoverlayname);

            if (RaiseChangedEvent)
            {
                if (res_name != null) Name = res_name;
                else Name = String.Empty;

                if (res_mainoverlayname != null) OverlayFile = res_mainoverlayname;
                else OverlayFile = String.Empty;
            }
            else
            {
                if (res_name != null) name = res_name;
                else name = String.Empty;

                if (res_mainoverlayname != null) overlayFile = res_mainoverlayname;
                else overlayFile = String.Empty;
            }

            foreach (SubOverlay obj in subOverlays)
                obj.ResolveStrings(StringResources, RaiseChangedEvent);

            foreach (SubOverlay obj in motionSubOverlays)
                obj.ResolveStrings(StringResources, RaiseChangedEvent);
        }
开发者ID:GJiin,项目名称:meridian59-dotnet,代码行数:31,代码来源:ObjectUpdate.cs

示例3: ResolveStrings

		public void ResolveStrings(StringDictionary StringResources, bool RaiseChangedEvent)
		{
			string res_name;

			StringResources.TryGetValue(resourceID, out res_name);

			if (RaiseChangedEvent)
			{
				if (res_name != null) ResourceName = res_name;
				else ResourceName = String.Empty;
			}
			else
			{
				if (res_name != null) resourceName = res_name;
				else resourceName = String.Empty;
			}
		}
开发者ID:GJiin,项目名称:meridian59-dotnet,代码行数:17,代码来源:StopSound.cs

示例4: AddErrorForInput

 private void AddErrorForInput(StringDictionary errors, string input, string template, params object[] args)
 {
   string msg = string.Format(template, args);
   string tmpInputs;
   errors.TryGetValue(msg, out tmpInputs);
   errors[msg] = tmpInputs + input + " ";
 }
开发者ID:eightrivers,项目名称:SSharp,代码行数:7,代码来源:GrammarDataBuilder.cs

示例5: ResolveStrings

		public void ResolveStrings(StringDictionary StringResources, bool RaiseChangedEvent)
        {
            string res_mainoverlayname;

			StringResources.TryGetValue(overlayFileRID, out res_mainoverlayname);

            if (RaiseChangedEvent)
            {           
                if (res_mainoverlayname != null) OverlayFile = res_mainoverlayname;
                else OverlayFile = String.Empty;
            }
            else
            {            
                if (res_mainoverlayname != null) overlayFile = res_mainoverlayname;
                else overlayFile = String.Empty;
            }
        }
开发者ID:GJiin,项目名称:meridian59-dotnet,代码行数:17,代码来源:Projectile.cs


注:本文中的StringDictionary.TryGetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。