🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #188

Re: Converting from Delphi (sets and streams)

#188
From: Marko Binic
Date: Sun, 29 Oct 2006 13:53
19 lines
1884 bytes
> For enumerations, use an integer type and the bit wise operators.

I know of that approach, but bitwise operations work with powers of 2, how 
would you do it with numbers like 9, 10, 13 and 32 - they have to be like 
that cause they're character codes ('\t', '\n', '\r', ' ') and using some 
constants would just reduce the speed of the program. Or am I wrong about 
this? How do Delphi sets work anyway (I mean internally, I know how to use 
them)?

> There isn't. C#, and the whole dotnet, is a type safe environment. You 
> have to rebuild each data type from the array of byte. In you example, to 
> rebuild a word, you read the low byte, then the high vyte (assuming words 
> are written in that order which is the native order for Intel processors), 
> your word is the high byte multiplyed by 256 and added to the low byte.

I thought so, thanks anyway.

Regards
Marko 
Technical Details
Message-ID: <4544b241@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45448666@newsgroups.borland.com> <4544a026$2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,228682803dcaeb60
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marko Binic" <marko_binic@yahoo.com>
Newsgroups: borland.public.csharpbuilder.language.csharp
References: <45448666@newsgroups.borland.com> <4544a026$2@newsgroups.borland.com>
Subject: Re: Converting from Delphi (sets and streams)
Date: Sun, 29 Oct 2006 14:53:09 +0100
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 213.137.121.1
Message-ID: <4544b241@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1162129985 213.137.121.1 (29 Oct 2006 05:53:05 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail