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


C# System.String类代码示例

本文整理汇总了C#中System.String的典型用法代码示例。如果您正苦于以下问题:C# System.String类的具体用法?C# System.String怎么用?C# System.String使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: DualMapGoalTest

 public DualMapGoalTest(System.String goalState1, System.String goalState2)
 {
     this.goalState1 = goalState1;
     this.goalState2 = goalState2;
     goals.Add(goalState1);
     goals.Add(goalState2);
 }
开发者ID:PaulMineau,项目名称:AIMA.Net,代码行数:7,代码来源:SolutionCheckerTest.cs

示例2: AssetTextureSource

        // ===========================================================
        // Constructors
        // ===========================================================

        public AssetTextureSource(Context pContext, String pAssetPath)
        {
            this.mContext = pContext;
            this.mAssetPath = pAssetPath;

            BitmapFactory.Options decodeOptions = new BitmapFactory.Options();
            decodeOptions.InJustDecodeBounds = true;

            //InputStream input = null;
            System.IO.Stream input = null;
            try
            {
                //input = pContext.getAssets().open(pAssetPath);
                input = pContext.Assets.Open(pAssetPath);
                BitmapFactory.DecodeStream(input, null, decodeOptions);
            }
            catch (IOException e)
            {
                Debug.E("Failed loading Bitmap in AssetTextureSource. AssetPath: " + pAssetPath, e);
            }
            finally
            {
                StreamUtils.CloseStream(input);
            }

            this.mWidth = decodeOptions.OutWidth;
            this.mHeight = decodeOptions.OutHeight;
        }
开发者ID:jamesburton,项目名称:AndEngine.net,代码行数:32,代码来源:AssetTextureSource.cs

示例3: FieldInfo

		internal bool storePayloads; // whether this field stores payloads together with term positions
		
		internal FieldInfo(System.String na, bool tk, int nu, bool storeTermVector, bool storePositionWithTermVector, bool storeOffsetWithTermVector, bool omitNorms, bool storePayloads, bool omitTermFreqAndPositions)
		{
			name = na;
			isIndexed = tk;
			number = nu;
			if (isIndexed)
			{
				this.storeTermVector = storeTermVector;
				this.storeOffsetWithTermVector = storeOffsetWithTermVector;
				this.storePositionWithTermVector = storePositionWithTermVector;
				this.storePayloads = storePayloads;
				this.omitNorms = omitNorms;
				this.omitTermFreqAndPositions = omitTermFreqAndPositions;
			}
			else
			{
				// for non-indexed fields, leave defaults
				this.storeTermVector = false;
				this.storeOffsetWithTermVector = false;
				this.storePositionWithTermVector = false;
				this.storePayloads = false;
				this.omitNorms = true;
				this.omitTermFreqAndPositions = false;
			}
		}
开发者ID:mindis,项目名称:Transformalize,代码行数:27,代码来源:FieldInfo.cs

示例4: LogVerbose

 public static void LogVerbose(String tag, String message, Throwable cause)
 {
     //noinspection PointlessBooleanExpression,ConstantConditions
     if ( Config.Debug && Log.IsLoggable(tag, LogPriority.Verbose)) {
     if (cause != null) Log.Verbose(tag, message, cause);
     }
 }
开发者ID:prashantvc,项目名称:XamarinIO,代码行数:7,代码来源:LogUtils.cs

示例5: TelParsedResult

 public TelParsedResult(System.String number, System.String telURI, System.String title)
     : base(ParsedResultType.TEL)
 {
     this.number = number;
     this.telURI = telURI;
     this.title = title;
 }
开发者ID:hankhongyi,项目名称:zxing_for_wp8,代码行数:7,代码来源:TelParsedResult.cs

示例6: AttributedString

        /**
         * Constructs an {@code AttributedString} from an {@code
         * AttributedCharacterIterator}, which represents attributed text.
         *
         * @param iterator
         *            the {@code AttributedCharacterIterator} that contains the text
         *            for this attributed string.
         */
        public AttributedString(AttributedCharacterIterator iterator)
        {
            if (iterator.getBeginIndex() > iterator.getEndIndex()) {
                // text.0A=Invalid substring range
                throw new java.lang.IllegalArgumentException("Invalid substring range"); //$NON-NLS-1$
            }
            StringBuilder buffer = new StringBuilder();
            for (int i = iterator.getBeginIndex(); i < iterator.getEndIndex(); i++) {
                buffer.Append(iterator.current());
                iterator.next();
            }
            text = buffer.ToString();
            java.util.Set<AttributedCharacterIteratorNS.Attribute> attributes = iterator
                    .getAllAttributeKeys();
            if (attributes == null) {
                return;
            }
            attributeMap = new java.util.HashMap<AttributedCharacterIteratorNS.Attribute, java.util.List<IAC_Range>>();//(attributes.size() * 4 / 3) + 1);

            java.util.Iterator<AttributedCharacterIteratorNS.Attribute> it = attributes.iterator();
            while (it.hasNext()) {
                AttributedCharacterIteratorNS.Attribute attribute = it.next();
                iterator.setIndex(0);
                while (iterator.current() != CharacterIteratorConstants.DONE) {
                    int start = iterator.getRunStart(attribute);
                    int limit = iterator.getRunLimit(attribute);
                    System.Object value = iterator.getAttribute(attribute);
                    if (value != null) {
                        addAttribute(attribute, value, start, limit);
                    }
                    iterator.setIndex(limit);
                }
            }
        }
开发者ID:sailesh341,项目名称:JavApi,代码行数:42,代码来源:AttributedString.cs

示例7: NDEFSmartPosterParsedResult

 internal NDEFSmartPosterParsedResult(int action, System.String uri, System.String title)
     : base(ParsedResultType.NDEF_SMART_POSTER)
 {
     this.action = action;
     this.uri = uri;
     this.title = title;
 }
开发者ID:hankhongyi,项目名称:zxing_for_wp8,代码行数:7,代码来源:NDEFSmartPosterParsedResult.cs

示例8: TermVectorEntry

		public TermVectorEntry(System.String field, System.String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)
		{
			this.field = field;
			this.term = term;
			this.frequency = frequency;
			this.offsets = offsets;
			this.positions = positions;
		}
开发者ID:mindis,项目名称:Transformalize,代码行数:8,代码来源:TermVectorEntry.cs

示例9: EmailAddressParsedResult

 internal EmailAddressParsedResult(System.String emailAddress, System.String subject, System.String body, System.String mailtoURI)
     : base(ParsedResultType.EMAIL_ADDRESS)
 {
     this.emailAddress = emailAddress;
     this.subject = subject;
     this.body = body;
     this.mailtoURI = mailtoURI;
 }
开发者ID:hankhongyi,项目名称:zxing_for_wp8,代码行数:8,代码来源:EmailAddressParsedResult.cs

示例10: GeoParsedResult

 internal GeoParsedResult(System.String geoURI, double latitude, double longitude, double altitude)
     : base(ParsedResultType.GEO)
 {
     this.geoURI = geoURI;
     this.latitude = latitude;
     this.longitude = longitude;
     this.altitude = altitude;
 }
开发者ID:hankhongyi,项目名称:zxing_for_wp8,代码行数:8,代码来源:GeoParsedResult.cs

示例11: TrackAppEvent

        public static void TrackAppEvent(String eventCategory, String eventToTrack)
        {
            var builder = new HitBuilders.EventBuilder();
            builder.SetCategory(eventCategory);
            builder.SetAction(eventToTrack);
            builder.SetLabel("AppEvent");

            Rep.Instance.GaTracker.Send(builder.Build());
        }
开发者ID:okrotowa,项目名称:Mosigra.Yorsh,代码行数:9,代码来源:GaService.cs

示例12: StopAnalyzer

 static StopAnalyzer()
 {
     {
         var stopWords = new System.String[]{"a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"};
         var stopSet = new CharArraySet(stopWords.Length, false);
         stopSet.AddAll(stopWords);
         ENGLISH_STOP_WORDS_SET = CharArraySet.UnmodifiableSet(stopSet);
     }
 }
开发者ID:Cefa68000,项目名称:lucenenet,代码行数:9,代码来源:StopAnalyzer.cs

示例13: uc_formpartsinfo

 public uc_formpartsinfo(
     System.String p1,
     System.Drawing.Point p2,
     System.Drawing.Point p3
     )
 {
     param = p1;
     prmStartPos = p2;
     prmEndPos = p3;
 }
开发者ID:ArsenShnurkov,项目名称:AckTerm,代码行数:10,代码来源:ackterm.maptxtcaretinfo.cs

示例14: SMSParsedResult

 public SMSParsedResult(System.String smsURI, System.String number, System.String via, System.String subject, System.String body, System.String title)
     : base(ParsedResultType.SMS)
 {
     this.smsURI = smsURI;
     this.number = number;
     this.via = via;
     this.subject = subject;
     this.body = body;
     this.title = title;
 }
开发者ID:hankhongyi,项目名称:zxing_for_wp8,代码行数:10,代码来源:SMSParsedResult.cs

示例15: TrackAppException

        public static void TrackAppException(String activity, String method, string exceptionName, string message, Boolean isFatalException)
        {
            var builder = new HitBuilders.ExceptionBuilder();
            var exceptionMessageToTrack = string.Format("{0}, Method : {1}\nException Name : {2}\nMessage : \n{3}", activity, method,
                exceptionName, message);
            builder.SetDescription(exceptionMessageToTrack);
            builder.SetFatal(isFatalException);

            Rep.Instance.GaTracker.Send(builder.Build());
        }
开发者ID:okrotowa,项目名称:Mosigra.Yorsh,代码行数:10,代码来源:GaService.cs


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