Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
GeneralRe: When to use & when not to use ( Abstract Class & Interface ) Pin
Krishna Varadharajan8-Mar-13 5:53
Krishna Varadharajan8-Mar-13 5:53 
AnswerRe: When to use & when not to use ( Abstract Class & Interface ) Pin
jschell8-Mar-13 12:41
jschell8-Mar-13 12:41 
QuestionWhy SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 1:50
Krishna Varadharajan8-Mar-13 1:50 
AnswerRe: Why SqlCommandBuilder Pin
Eddy Vluggen8-Mar-13 3:01
professionalEddy Vluggen8-Mar-13 3:01 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 3:22
Krishna Varadharajan8-Mar-13 3:22 
GeneralRe: Why SqlCommandBuilder Pin
Eddy Vluggen8-Mar-13 4:59
professionalEddy Vluggen8-Mar-13 4:59 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 5:55
Krishna Varadharajan8-Mar-13 5:55 
GeneralRe: Why SqlCommandBuilder Pin
Eddy Vluggen8-Mar-13 7:12
professionalEddy Vluggen8-Mar-13 7:12 
AnswerRe: Why SqlCommandBuilder Pin
PIEBALDconsult8-Mar-13 3:38
mvePIEBALDconsult8-Mar-13 3:38 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 3:59
Krishna Varadharajan8-Mar-13 3:59 
GeneralRe: Why SqlCommandBuilder Pin
PIEBALDconsult8-Mar-13 5:42
mvePIEBALDconsult8-Mar-13 5:42 
GeneralRe: Why SqlCommandBuilder Pin
Krishna Varadharajan8-Mar-13 5:56
Krishna Varadharajan8-Mar-13 5:56 
QuestionWireless Sensor Node Simulation Time in C# Pin
Nico Encarnacion7-Mar-13 14:45
Nico Encarnacion7-Mar-13 14:45 
AnswerRe: Wireless Sensor Node Simulation Time in C# Pin
Gerry Schmitz7-Mar-13 18:49
mveGerry Schmitz7-Mar-13 18:49 
GeneralRe: Wireless Sensor Node Simulation Time in C# Pin
Nico Encarnacion12-Mar-13 20:05
Nico Encarnacion12-Mar-13 20:05 
GeneralRe: Wireless Sensor Node Simulation Time in C# Pin
Gerry Schmitz13-Mar-13 12:10
mveGerry Schmitz13-Mar-13 12:10 
QuestionExplicit type-casting of pointer Pin
Flo_897-Mar-13 11:18
Flo_897-Mar-13 11:18 
AnswerRe: Explicit type-casting of pointer Pin
Gerry Schmitz7-Mar-13 12:23
mveGerry Schmitz7-Mar-13 12:23 
GeneralRe: Explicit type-casting of pointer Pin
Flo_897-Mar-13 12:24
Flo_897-Mar-13 12:24 
AnswerRe: Explicit type-casting of pointer Pin
Matt T Heffron7-Mar-13 12:34
professionalMatt T Heffron7-Mar-13 12:34 
In general, c# (or any managed .NET language) does not have pointers.
(Yes, there's unsafe and IntPtr but that is not necessary to accomplish what you've described.)

The way to do this kind of thing in c# is to use the class System.BitConverter.
So to convert a byte[] into a float is:
C#
class Program
{
  static void Main(string[] args)
  {
    byte[] test = { 25, 4, 158, 63 };
    float p = BitConverter.ToSingle(test, 0);
    Console.WriteLine(p);
  }
}

Going the other way, from float to byte[], you would use BitConverter.GetBytes(value);
AnswerRe: Explicit type-casting of pointer Pin
harold aptroot7-Mar-13 21:57
harold aptroot7-Mar-13 21:57 
QuestionHow to highlight word in word document using C# Pin
Tridip Bhattacharjee7-Mar-13 3:56
professionalTridip Bhattacharjee7-Mar-13 3:56 
AnswerRe: How to highlight word in word document using C# Pin
Richard MacCutchan7-Mar-13 5:13
mveRichard MacCutchan7-Mar-13 5:13 
GeneralRe: How to highlight word in word document using C# Pin
Tridip Bhattacharjee8-Mar-13 1:46
professionalTridip Bhattacharjee8-Mar-13 1:46 
GeneralRe: How to highlight word in word document using C# Pin
Richard MacCutchan8-Mar-13 2:16
mveRichard MacCutchan8-Mar-13 2:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.