Pchp.Core.PhpString.ChunkToBoolean C# (CSharp) Method

ChunkToBoolean() static private method

static private ChunkToBoolean ( object chunk ) : bool
chunk object
return bool
        static bool ChunkToBoolean(object chunk)
        {
            AssertChunkObject(chunk);

            if (chunk.GetType() == typeof(string)) return Convert.ToBoolean((string)chunk);
            if (chunk.GetType() == typeof(byte[])) Convert.ToBoolean((byte[])chunk);
            if (chunk.GetType() == typeof(PhpString)) ((PhpString)chunk).ToBoolean();
            if (chunk.GetType() == typeof(char[])) Convert.ToBoolean((char[])chunk);
            throw new ArgumentException();
        }