عرض مشاركة واحدة
قديم 2020-02-19, 09:53 AM
المشاركة 6
megokarika
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: مشكلة فى الجليد سورس rayz v3
على العموم المشكله دى مش موجوده فى رايزو بس هنفترض انها موجوده
الحل زى ما قلك العبقرى احمد رايدر
وهفسرلك الرد بتاعو
الباكت موجود فى باكت هلندر سيبو
ابحث عن كلاس

كود:
BitConverter 

امسحو وبدل كل الى فيه بده

كود:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 
Rayzo
{
    public 
unsafe class BitConverter
    
{



        public static 
ulong ToUInt64(byte[] bufferint offset)
        {
            if (
offset buffer.Length 8) return 0;
            
fixed (byteBuffer buffer)
            {
                return *((
ulong*)(Buffer offset));
            }
        }
        public static 
Boolean ToBoolean(byte[] bufferint offset)
        {
            if (
offset buffer.Length 4) return false;
            
fixed (byteBuffer buffer)
            {
                return *((
Boolean*)(Buffer offset));
            }
        }
        public static 
uint ToUInt32(byte[] bufferint offset)
        {
            if (
offset buffer.Length 4) return 0;
            
fixed (byteBuffer buffer)
            {
                return *((
uint*)(Buffer offset));
            }
        }
        public static 
int ToInt32(byte[] bufferint offset)
        {
            if (
offset buffer.Length 4) return 0;
            
fixed (byteBuffer buffer)
            {
                return *((
int*)(Buffer offset));
            }
        }
        public static 
ushort ToUInt16(byte[] bufferint offset)
        {
            if (
offset buffer.Length 2) return 0;
            
fixed (byteBuffer buffer)
            {
                return *((
ushort*)(Buffer offset));
            }
        }
        public static 
short ToInt16(byte[] bufferint offset)
        {
            if (
offset buffer.Length 2) return 0;
            
fixed (byteBuffer buffer)
            {
                return *((
short*)(Buffer offset));
            }
        }

        public static 
ulong ReadUlong(byte[] bufferint offset)
        {
            
fixed (byteBuffer buffer)
            {
                return *((
ulong*)(Buffer offset));
            }
        }
        public static 
uint ReadUint(byte[] bufferint offset)
        {
            
fixed (byteBuffer buffer)
            {
                return *((
uint*)(Buffer offset));
            }
        }
        public static 
ushort ReadUshort(byte[] bufferint offset)
        {
            
fixed (byteBuffer buffer)
            {
                return *((
ushort*)(Buffer offset));
            }
        }
    }


جرب ورد علينا


ارجو الاهتمام