Beispiel #1
0
        public void escribeClave(Object clave, long pos, int tipoClave, CArchivo file)
        {
            BinaryWriter bW;

            bW = file.getBw();
            bW.BaseStream.Seek(pos, SeekOrigin.Begin);

            switch (tipoClave)
            {
                case 2://Short
                    bW.Write((short)clave);
                break;
                case 3://Int
                    bW.Write((int)clave);
                break;
                case 4://Float
                    bW.Write((float)clave);
                break;
                case 5://Long 
                    bW.Write((long)clave);
                break;
                case 6://Double
                    bW.Write((double)clave);
                break;
                case 7://Cadena
                    bW.Write((string)clave);
                break;
            }
        }