|
You need to do the select statement first, then you can compare the data that comes out. You probably want them both to be date time objects, so you compare the dates and not their string representation.
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 )
|
|
|
|
|
There is a screen that appears before a user logs off.
He has to choose whether to log off or switch user.
Or it can be the screen of log off / shut down and etc.
I want to perform some code before this screen appears.
How can I register to the event ?
Thanks,
Clint
|
|
|
|
|
|
What happens when you try it?
Paul Marfleet
|
|
|
|
|
c# dont want to compile it
nemanja
|
|
|
|
|
There's your answer then!
Paul Marfleet
|
|
|
|
|
are you kididng it must be some way to compile it like working with bits and bytes ore such ...
or some lists,arrays, ....
nemanja
|
|
|
|
|
conemajstor wrote: are you kididng
Why would I be kididng [sic]? You asked whether variables names that begin with a number are valid. I suggested that you tried it and observed what happened. You tried it and found that it didn't work. By following an empirical approach, you have answered your own question.
conemajstor wrote: it must be some way to compile it like working with bits and bytes ore such ...
or some lists,arrays, ....
This sentence is nonsense. I have no idea what you are talking about.
Paul Marfleet
|
|
|
|
|
pmarfleet wrote: This sentence is nonsense.
Your terse and highly accurate observation leaves me no choice but to vote your post a 5.
/ravi
|
|
|
|
|
conemajstor wrote: I bet with the teacher that this is possible
You lose.
Not even with the @ identifier specifier does it work:
int @int = 1;
int @1name = 1;
An identifier in C# can never ever start with a digit.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Guffa wrote: An identifier in C# can never ever start with a digit.
Bonus question: can identifier start with digit in IL? (I gave up after maybe 2 min. of googling )
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
I hope you didn't bet too much, or you could end up buying your teacher a Porsche. He's right, and you're wrong. Variables can't start with a number as you found out when you tried to compile it.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
but if i enum ??
enum(1a,2a,3a,4a,5a)
nemanja
|
|
|
|
|
Enum members are not variables, and even those identifier cannot start with a number.
Had you tried it yourself, you would have found out quite easily.
But, in either case, you still lose...
|
|
|
|
|
conemajstor wrote: I bet with the teacher
Do you have a gambling problem? That's like betting on a three legged dog!
|
|
|
|
|
my teacher is one peace of sh*t ... im 92' and i am programming 5 years now and he teaches me whats a computer .. how to switch it off , on, het yells to me when i am not listening him .... and this question is for Pascal but i havent found pascal forum ... we learn pasacl becaues my teacher is 65 years old and dont know anything other .... i won 3 bets allready from him!!!!
nemanja
|
|
|
|
|
My sympathys are with your teacher. You don't listen to him, and you still haven't learned your lesson.
conemajstor wrote: won 3 bets allready from him
But not this one.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
conemajstor wrote: im 92'
You are ninety-two feet? Or did you perhaps mean '92?
conemajstor wrote: i am programming 5 years now
Oh, a newbie.
conemajstor wrote: het yells to me when i am not listening him
Go figure...
conemajstor wrote: we learn pasacl
That's good. Pascal is an excellent language for learning programming.
conemajstor wrote: becaues my teacher is 65 years old and dont know anything other
I seriously doubt that.
conemajstor wrote: i won 3 bets allready from him
So now you think that you know anything?
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
There's nothing wrong with being 65. Unless you're the leader of the British Liberal Democrats...
Paul Marfleet
|
|
|
|
|
You really need to listen. If he's your teacher, he's better than you. Usually, but now, duh. Period.
The most knowledge doesn't mean the most wise...
|
|
|
|
|
> .... and this question is for Pascal but i havent found pascal forum ...
Sorry, but it's not valid in Pascal, either.
(unless you use the font-edit method below)
Thomas Bates
I want to live in Theory. Everything works in Theory.
|
|
|
|
|
10 bucks says it falls down!
Ninja (the Nerd)
Confused? You will be...
|
|
|
|
|
You could always... cheat.
Fonts, all they are a little pictures really. What is it, courier new that compilers mostly use?
Anyway, see if you can get yourself that font, edit out some symbol that is allowed, and make it a number.
To the user, the first letter in the variable name is a number, but to the compiler its just a symbol, or another letter.
Oh, by the way, cheating is bad. Don't do it
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Hi All,
I have a Form in and a class, I need to access a control on Form1 from a other class. So i can populate the data in those control using other class. Please Help! if possibile please show some code.
I.e--> //Both classes in same project
class Form1
{
//All control in this class
ListBox list1 = new ListBox();
TextBox box1 = new TextBox();
}
class myClass
{
//Need to access a control of Form1 and fill with data, lets say we want fill list1 and set bo1.Text =
}
A.Asif
|
|
|
|
|
There is more than one way to do this. It depend on the context.
I will show you 2 way, the first one is simple if the class only update this form and they are closely related. The other is an exemple for a class that can update this data in differents forms that can have differents controls but the same data.
***** Example 1:
<br />
class Form1<br />
{<br />
<br />
private ListBox list1 = new ListBox();<br />
private TextBox box1 = new TextBox();<br />
<br />
public ListBox List1 {<br />
get { return list1;}<br />
}<br />
<br />
public TextBox Box1{<br />
get { return box1;}<br />
}<br />
<br />
<br />
<br />
}<br />
<br />
class myClass<br />
{<br />
UpdateForm1(Form1 frm)<br />
{<br />
frm.List1.Items.Add("TEST");
frm.Box1.Text = "TEST";<br />
}<br />
<br />
}<br />
***** Example 2:
<br />
interface IUpdateForm<br />
{<br />
UpdateData(string[] items, string newText);<br />
}<br />
<br />
class Form1 : IUpdateForm<br />
{<br />
<br />
private ListBox list1 = new ListBox();<br />
private TextBox box1 = new TextBox();<br />
<br />
public Form_Load()<br />
{<br />
new myClass().UpdateForm(this);<br />
}<br />
<br />
public UpdateData(string[] items, string newText)<br />
{<br />
this.list1.Items.Add(items);<br />
this.box1.Text = newText;<br />
<br />
}<br />
<br />
}<br />
<br />
class myClass<br />
{<br />
UpdateForm(IUpdateForm uptFrm)<br />
{<br />
uptFrm.UpdateData(someArray, someText);<br />
}<br />
<br />
}<br />
There are more possibilities but theses two examples will give you the idea.
|
|
|
|