| | |
bitvector32 error
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2006
Posts: 1
Reputation:
Solved Threads: 0
I am receiving a 'Cannot convert type 'bool' to 'int'" error, while using BitVector32.Section. I am trying to make ints, not booleans. I used this previously in the same way and it worked.
Here is my code. I am passing it an Int32. Thank you for anyone who can tell me why I am receiving this error.
Here is my code. I am passing it an Int32. Thank you for anyone who can tell me why I am receiving this error.
C# Syntax (Toggle Plain Text)
public class ReadDopFixAlt { private BitVector32.Section sectAlt1; private BitVector32.Section sectAlt2; private BitVector32.Section sectFix; private BitVector32.Section sectDGPS; private BitVector32.Section sectHDOP; public ReadDopFixAlt() { sectAlt1 = BitVector32.CreateSection(32767); sectAlt2 = BitVector32.CreateSection(15, sectAlt1); sectFix = BitVector32.CreateSection(3, sectAlt2); sectDGPS = BitVector32.CreateSection(1, sectFix); sectHDOP = BitVector32.CreateSection(1023, sectDGPS); } public string ParseDopFixAlt(int data) { // Create an instance of BitVector32 using // the data passed to this method. BitVector32 wrd = new BitVector32(data); int Alt1 = wrd[Alt1]; int Alt2 = wrd[Alt2]; int Fix = wrd[Fix]; int DGPS = wrd[DGPS]; int HDOP = wrd[HDOP]; StringBuilder tb = new StringBuilder(); tb.Append(Fix.ToString() + ',' + ' '); tb.Append(DGPS.ToString() + ',' + ' '); tb.Append(HDOP.ToString() + ',' + ' '); tb.Append(Alt1.ToString()); return tb.ToString(); } }
![]() |
Similar Threads
- Error Loading operating System (Windows NT / 2000 / XP)
- svchost.exe error (Windows NT / 2000 / XP)
- New Hardware Causing Error (Windows NT / 2000 / XP)
- office 2000 install error (Windows NT / 2000 / XP)
- VMWare Unrecoverable Error (*nix Software)
- Error in Wrox Book (Perl)
Other Threads in the C# Forum
- Previous Thread: Average of prime number between 1 & 100
- Next Thread: C# Project
| Thread Tools | Search this Thread |
.net access activedirectory ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox connect control conversion cryptographyc#winformsencryption csharp custom database datagrid datagridview dataset datetime degrees development disabled displayingopenforms draganddrop drawing encryption enum event excel file foreach form format forms ftp function gdi+ httpwebrequest image index index-error input install java label list listbox mandelbrot math mathematics mouseclick mysql operator path photoshop picturebox pixelinversion post prime programming radians regex remote remoting richtextbox serialization server setup sleep socket sql statistics stream string table text textbox thread time timer totaldays update user usercontrol validation visualstudio webbrowser windows winforms wpf xml





