MyStream.Seek C# (CSharp) Method

Seek() public method

public Seek ( long offset, System origin ) : long
offset long
origin System
return long
 public override long Seek(long offset, System.IO.SeekOrigin origin)  { return (long)0;}
 public override void SetLength(long value)  { }

Usage Example

示例#1
0
        public static int FunctionLength(MyStream sr, string s)
        {
            int   count   = 0;
            uint  curPos  = sr.Pos;
            Stack myStack = new Stack();

            s = sr.ReadLine();
            myStack.Push(s);
            bool found = false;

            while ((s != null && myStack.Count > 0))
            {
                count++;
                s = sr.ReadLine();
                if (s.IndexOf("{") != -1)
                {
                    myStack.Push(s);
                }
                if (s.IndexOf("}") != -1)
                {
                    myStack.Pop();
                }
            }
            if (myStack.Count == 0)
            {
                found = true;
            }
            count = count - 1;
            myStack.Clear();
            sr.Seek(curPos);
            return(count);
        }
All Usage Examples Of MyStream::Seek