Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
QuestionHow to directly access the virtual method table of a COM Interface pointer? Pin
Ryan Leckey21-Aug-08 15:12
Ryan Leckey21-Aug-08 15:12 
QuestionEditing element in List Pin
Winson Lee21-Aug-08 14:25
Winson Lee21-Aug-08 14:25 
AnswerRe: Editing element in List Pin
Ryan Leckey21-Aug-08 16:11
Ryan Leckey21-Aug-08 16:11 
AnswerRe: Editing element in List Pin
Guffa21-Aug-08 21:34
Guffa21-Aug-08 21:34 
AnswerRe: Editing element in List Pin
Jon Hulatt22-Aug-08 3:44
Jon Hulatt22-Aug-08 3:44 
QuestionHi I need some help with this code Pin
Angelinna21-Aug-08 13:05
Angelinna21-Aug-08 13:05 
AnswerRe: Hi I need some help with this code Pin
Christian Graus21-Aug-08 13:15
protectorChristian Graus21-Aug-08 13:15 
GeneralRe: Hi I need some help with this code Pin
Angelinna21-Aug-08 13:22
Angelinna21-Aug-08 13:22 
This is where I started from, thanks.
.............................................................
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TwosComplement
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();

for (int i = 0; i < 8; i++)
{ bitstring[i] = 0;}
twoc_output.Text = "enter an integer";
decimal_output.Text = "enter a length 8 bitstring";

}

private int[] bitstring = new int[8];

private int nDecimal;


//strings for reading the bitstring in and out
private string instring, outstring;
private string nextbit;

//helper function for flipping bits in the bitstring
private int negate(int x)
{
if (x == 1) return 0;
return 1;
}

//method to convert decimal stored in "nDecimal"
//to two's complement representation, stored in array "bitstring"
private void decimal_to_twoc( )
{
int nDecimal = Convert.ToInt32(decimal_input.Text);

string numBits = Convert.ToString(decimal_output.Text);

int carry = 1;
int flag = 0;
if (flag==0)
{
for (int i = 0; i < 8; i++)
bitstring[i] = bitstring[i] + 2;
bitstring[nDecimal] = carry;
carry = 0;
if (bitstring[nDecimal] > 1)
{

bitstring[nDecimal] = 0;
carry = 1;
}

}


}
GeneralRe: Hi I need some help with this code Pin
Christian Graus21-Aug-08 13:38
protectorChristian Graus21-Aug-08 13:38 
QuestionRe: Hi I need some help with this code Pin
Angelinna21-Aug-08 14:00
Angelinna21-Aug-08 14:00 
AnswerRe: Hi I need some help with this code Pin
Christian Graus21-Aug-08 15:38
protectorChristian Graus21-Aug-08 15:38 
GeneralRe: Hi I need some help with this code Pin
Guffa21-Aug-08 21:50
Guffa21-Aug-08 21:50 
QuestionHow can I get input from 2 forms? Pin
CopperCircle21-Aug-08 11:33
CopperCircle21-Aug-08 11:33 
AnswerRe: How can I get input from 2 forms? Pin
Christian Graus21-Aug-08 11:44
protectorChristian Graus21-Aug-08 11:44 
AnswerRe: How can I get input from 2 forms? [modified] Pin
DaveyM6921-Aug-08 12:02
professionalDaveyM6921-Aug-08 12:02 
GeneralRe: How can I get input from 2 forms? Pin
ianhunt0121-Aug-08 20:09
ianhunt0121-Aug-08 20:09 
GeneralRe: How can I get input from 2 forms? Pin
DaveyM6921-Aug-08 21:25
professionalDaveyM6921-Aug-08 21:25 
AnswerDO THIS EXEMPLE OK? Pin
nelsonpaixao21-Aug-08 15:30
nelsonpaixao21-Aug-08 15:30 
GeneralRe: DO THIS EXEMPLE OK? Pin
Silvyster21-Aug-08 21:21
Silvyster21-Aug-08 21:21 
AnswerRe: DO THIS EXEMPLE OK? Pin
nelsonpaixao22-Aug-08 13:36
nelsonpaixao22-Aug-08 13:36 
QuestionTest-driven developed project example Pin
sacoskun21-Aug-08 9:24
sacoskun21-Aug-08 9:24 
AnswerRe: Test-driven developed project example Pin
leppie21-Aug-08 22:00
leppie21-Aug-08 22:00 
GeneralRe: Test-driven developed project example Pin
sacoskun22-Aug-08 6:26
sacoskun22-Aug-08 6:26 
QuestionPictureBox trasparency Pin
Member 431105721-Aug-08 9:09
Member 431105721-Aug-08 9:09 
AnswerRe: PictureBox trasparency Pin
Pete O'Hanlon21-Aug-08 11:07
mvePete O'Hanlon21-Aug-08 11:07 

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.