|
That's one reasonable guess. Characters not allowed in a filename is another. It's really impossible to tell.
And it's incredible how many people come here, ask oblique questions and never answer when you ask for more information to try to help them.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: What do you mean by 'special' ???
It eats all its meals with a spoon, and married its cousin.
|
|
|
|
|
Hi,
If you use an automatic property and want to reference it within the same class I assume you would specify the property but if you had another property within the same class that required validation you would reference the field.
Don't you think this is messy code?
<code>
private string _firstName;
public string FirstName
{
get
{
return _firstName;
}
set
{
_firstName = value;
}
}
public string LastName { get; set; }
public void Foo()
{
string test = _firstName + LastName;
}
</code>
|
|
|
|
|
I think automatic properties are ugly to start with.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Why not like this?
public void Foo()<br />
{<br />
string test = FirstName + LastName;<br />
}
The fact that there is a field doesn't mean you have to use it...
Robert
|
|
|
|
|
The Microsoft Coding Guidelines says you should use fields internally within a class.
I could be wrong?!?!?
|
|
|
|
|
They are guidelines. Not the law. Judge Dredd isn't going to pay a visit because of this.
|
|
|
|
|
He will if you name all your controls TextBox1 and ComboBox1 though.
Okay, I can dream...
|
|
|
|
|
He mightn't, but I will visit with the wet towel of vengeance ready to whip his sorry ass.
|
|
|
|
|
My first job was in a very small startup. The owner thought he was a developer and created variables 'a' and 'b' then when he needed more he would go to 'aa' and 'bb'
I'm still waiting to see anyone top that story, and it's true!
led mike
|
|
|
|
|
Those guidelines were probably written before automatic properties were introduced.
I made just a suggestion. You said it looked ugly...
Robert
|
|
|
|
|
Hi,
If you use an automatic property and want to reference it within the same class I assume you would specify the property but if you had another property within the same class that required validation you would reference the field.
Don't you think this is messy code?
<br />
<br />
private string _firstName;<br />
<br />
public string FirstName<br />
{<br />
<br />
get<br />
{<br />
return _firstName;<br />
}<br />
set<br />
{<br />
_firstName = value;<br />
}<br />
}<br />
<br />
public string LastName { get; set; }<br />
<br />
public void Foo()<br />
{<br />
string test = _firstName + LastName;<br />
}<br />
<br />
modified on Thursday, March 6, 2008 5:29 AM
|
|
|
|
|
tell me, is the following so hard to understand :
<font color="red">Please do not post programming questions here</font>
moreover, you were already been told so in one of your previous questions XLINQ. so, no excuse man
|
|
|
|
|
On 15th Dec 2007 you were told not to post programming questions[^] in the Lounge.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Please forgive me! I apologies for innocently posting a programming related question in the wrong forum on a programming website.
|
|
|
|
|
GChannon wrote: innocently
How do you trip down so frequently? Assume you are elecrocuted today accidentally by stamping over a live electric wire. Ten days down the line, would'nt you be more careful when you are repairing an electric appliance?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Rajesh R Subramanian wrote: 15th Dec 2007
That was on 15th December 2007. Today is not 15th December 2007. Today it is 6th March 2008. Your system clock is very slow. You may need to replace your CMOS.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Is it a programming question or is he asking programming preference.
Brainware Error - reboot required.
|
|
|
|
|
Anonymous properties are a convenience. Don't abuse them - be consistent with your approach to them.
|
|
|
|
|
Hi! all. Right now m working on a win Email application.I need to create a user interface and so users can select the recipients from Exchange Server Address Book, so user can send e-mail with attachment to the recipients in web application. so, anybody have any idea about that.i need a sample so i can use it in my project.
thanks..
|
|
|
|
|
Hello,
is there a function in C# to convert hexadecimal to a 64Bit floating point number. Or do i have to find out manually the mantissa and the exponent.
(I'm also looking for function to convert a decimal into a hexadecimal.)
Thanks in advance, Felix.
|
|
|
|
|
There is no such thing as a conversion from decimal to hex. They are the same thing internally, what you want to do, is to display them in a different format. So, you need the ToString method, which has overloads that take format strings. I've never seen a hexadecimal floating point number used anywhere, but if it's already floating point, it's not hex in memory, it's just a number.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
This is exactly was i was searching:
BitConverter.Int64BitsToDouble(doubleValueHere)
|
|
|
|
|
Christian Graus wrote: There is no such thing as a conversion from decimal to hex.
He didnt ask that.
|
|
|
|
|
I had the same problem, and I resolved it creating a C dll with 2 function:
//convert float TO buffer (4 Byte)
int _stdcall floatTOhex(float &value,char buffer[])
{
memcpy(buffer,&value,sizeof(float));
return 0;
}
//convert buffer (4 byte) to float
int _stdcall hexTOfloat(float &value,char buffer[])
{
memcpy(&value,buffer,sizeof(float));
return 0;
}
I Call in C# with PInvoke
[DllImport("float2hex.dll", EntryPoint="floatTOhex")]
public static extern int floatTOhex(ref float value,byte[] buffer);
[DllImport("float2hex.dll", EntryPoint="hexTOfloat")]
public static extern int hexTOfloat(ref float value,byte[] buffer);
example:
byte[] temp=new byte[4];
float f=0.10F;
floatTOhex(ref f,temp)); //load in buffer temp 4 HEX from float
hexTOfloat(ref f,temp); //load in f the buffer temp value;
I think you can adjust it for 64 bit float.
Look-out for little or big endian
|
|
|
|