• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# System.String类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: DecoderResult

		public DecoderResult(sbyte[] rawBytes, System.String text, System.Collections.ArrayList byteSegments, ErrorCorrectionLevel ecLevel)
		{
			if (rawBytes == null && text == null)
			{
				throw new System.ArgumentException();
			}
			this.rawBytes = rawBytes;
			this.text = text;
			this.byteSegments = byteSegments;
			this.ecLevel = ecLevel;
		}
开发者ID:marinehero,项目名称:ThinkAway.net,代码行数:11,代码来源:DecoderResult.cs


示例17: SegmentWriteState

		public SegmentWriteState(DocumentsWriter docWriter, Directory directory, System.String segmentName, System.String docStoreSegmentName, int numDocs, int numDocsInStore, int termIndexInterval)
		{
			this.docWriter = docWriter;
			this.directory = directory;
			this.segmentName = segmentName;
			this.docStoreSegmentName = docStoreSegmentName;
			this.numDocs = numDocs;
			this.numDocsInStore = numDocsInStore;
			this.termIndexInterval = termIndexInterval;
            flushedFiles = new System.Collections.Generic.HashSet<string>();
		}
开发者ID:mindis,项目名称:Transformalize,代码行数:11,代码来源:SegmentWriteState.cs


示例18: SetAssetBasePath

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

        // ===========================================================
        // Getter & Setter
        // ===========================================================

        /**
         * @param pAssetBasePath must end with '<code>/</code>' or have <code>.length() == 0</code>.
         */
        public static void SetAssetBasePath(String pAssetBasePath)
        {
            if (pAssetBasePath.EndsWith("/") || pAssetBasePath.Length == 0)
            {
                MusicFactory.sAssetBasePath = pAssetBasePath;
            }
            else
            {
                throw new IllegalStateException("pAssetBasePath must end with '/' or be lenght zero.");
            }
        }
开发者ID:jamesburton,项目名称:AndEngine.net,代码行数:22,代码来源:MusicFactory.cs


示例19: NvtParserEventArgs

 public NvtParserEventArgs(
     NvtActions        p1,
     System.Char       p2,
     System.String     p3,
     uc_Params         p4)
 {
     //prntSome.printSome("NvtParserEventArgs");
     Action       = p1;
     CurChar      = p2;
     CurSequence  = p3;
     CurParams    = p4;
 }
开发者ID:ArsenShnurkov,项目名称:AckTerm,代码行数:12,代码来源:ackterm.telnet.cs


示例20: CompoundFileReader

		public CompoundFileReader(Directory dir, System.String name, int readBufferSize)
		{
			directory = dir;
			fileName = name;
			this.readBufferSize = readBufferSize;
			
			bool success = false;
			
			try
			{
				stream = dir.OpenInput(name, readBufferSize);
				
				// read the directory and init files
				int count = stream.ReadVInt();
				FileEntry entry = null;
				for (int i = 0; i < count; i++)
				{
					long offset = stream.ReadLong();
					System.String id = stream.ReadString();
					
					if (entry != null)
					{
						// set length of the previous entry
						entry.length = offset - entry.offset;
					}

					entry = new FileEntry {offset = offset};
					entries[id] = entry;
				}
				
				// set the length of the final entry
				if (entry != null)
				{
					entry.length = stream.Length() - entry.offset;
				}
				
				success = true;
			}
			finally
			{
				if (!success && (stream != null))
				{
					try
					{
						stream.Close();
					}
					catch (System.IO.IOException)
					{
					}
				}
			}
		}
开发者ID:mindis,项目名称:Transformalize,代码行数:52,代码来源:CompoundFileReader.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Text.ASCIIEncoding类代码示例发布时间:2022-05-24
下一篇:
C# Security.SecurityElement类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap