Thread: IMEI Protection
View Single Post
  #18 (permalink)  
Old 06-02-2008, 10:01 AM
agraham's Avatar
agraham agraham is online now
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,686
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by Elrick View Post
Hello again, [b]What is it? Is this code compiles for all, except me?
No it doesn't optimise compile because the C# compiler doesn't like this line of code produced by the B4ppc compiler.

db2000_GetInfoDevice.GetDevice+GeneralInfo _generalinfo = null;

GeneralInfo is a Struct declared private but B4ppc sees it anyway and treats it as an object. I don't really understand why the C# compiler doesn't like it, probably because as GeneralInfo is declared private it is honouring that declaration which makes it unavailable to the main program.

One solution would be to rename it to _GeneralInfo, which the B4ppc compiler will ignore due to the leading underscore, and access it through a public property which the B4ppc compiler treats correctly. It might also work if declared public.
Reply With Quote