|
As people have mentioned, properties dont offer you anything more than a pair of get_foo, set_foo methods would.
There is a difference in the semantics. Properties are expected to be determanistic, repeatable and have no side effects.
When using... say... a grammar parsing API, I would expect the Token property to keep returning the same thing until I called "MoveNext" or something similar. I would not be surprised if a method called Token() kept moving to the next token in the stream each time I called it.
|
|
|
|
|
Thanks i get your point
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Just FYI. "OOPS" is something you say when you make a mistake like "Oops, I dropped my pen". OOP is a TLA for "Object orientated Programming".
Drop the S.
|
|
|
|
|
Thanks i will not Forget that
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
HI .,
I have a string like "[Hi All]"
and now I want to Replace Characters [,], and Space
I am Trying to Do it :
String.Replace(new Char[] {'[',']'},new Char[] (''})
But This is giving error .
Question Can we do it this way , I mean replace array of Characters with Space in one Go.
Thanks in advance
Develop2Program & Program2Develop
|
|
|
|
|
What error does it give? Looks to me like you've just got the syntax very very wrong.
What you need is something more like:
myString.Replace('x', 'y');
Which would replace all instances of x in that String with y.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Try this...
result = MyString.Replace('[','').Replace(']','')
|
|
|
|
|
here is code :
string string1 = "[Hi All]";
string1 = string1.Replace("[","").Replace("]","").Replace(" ","");
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi All,
I want to activate a form when its deactivated. I have tried with this.Activate() in Form1_Deactivate() event. This did n't work for this task.
Could any body help in this task?
Thanks,
SMARTech
|
|
|
|
|
see this
<br />
Private Function CheckExistance(ByVal strFormname As String) As Boolean<br />
'determine if the form already exists<br />
Dim frmtest As Form<br />
Dim blnFound As Boolean = False<br />
'does form already Exists?<br />
For Each frmtest In Me.MdiChildren<br />
With frmtest<br />
If .Name = strFormname Then<br />
.Activate() 'Activate Previous instance.<br />
blnFound = True<br />
<br />
<br />
End If<br />
End With<br />
Next<br />
Return blnFound<br />
<br />
End Function<br />
<br />
And use the Above Function Like this
<br />
Dim blnFormExists As Boolean = False<br />
<br />
blnFormExists = CheckExistance("Form1")<br />
If Not blnFormExists Then<br />
Dim objform1 As New Form1<br />
With objform1 <br />
.MdiParent = Me<br />
.Show()<br />
End With<br />
End If<br />
Hope it helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hmmm.... its C# forum
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
thanks for your quick response,
but its not working for me.I'l explain the case little bit clear.
Suppose, Form1 is running. If we open task manager also, the focus should be on Form 1 only but it should not allow us to access task manager,
any idea please
Thanks in advance
SMARTech
|
|
|
|
|
AFAIK, there's no way to prevent access to Task Manager. It's a separate application running in it's own process space, so there will always be a way to get to it. Similarly, you can't prevent people getting access to other applications - it would be a very poor design if you could because this would interfere with the way people want to work. In other words, if you could do this there would be nothing to stop a virus writer from ruining your program.
|
|
|
|
|
I agree with Pete, this is generally a bad idea. If you really need it, check out SetForegroundWindow and MainWindowHandle API functions at www.pinvoke.net
I'm pretty sure you can't deal with taskmanager though - for obvious reasons.
Dave
|
|
|
|
|
Hy everybody,
knows anyone a good Gantt-Control?
thanks
sunspeed
|
|
|
|
|
|
Thanks for your reply.
I asked Mr. Google in the last weeks too and he presented me your suggestions.
You could be sure, that I don´t ask Questions or request help, before I tried anything.
Thanks anyway.
cheers
sunspeed
|
|
|
|
|
I Execute "select * from dbo.Employees for xml auto" in sqlServer.
C# Develope:
SqlConnection sqlCon = new SqlConnection(@"server=JASON-FREE\SQL2K;database=Northwind;uid=sa;pwd=**");
SqlCommand sqlComm = new SqlCommand();
sqlComm.CommandType = CommandType.Text;
sqlComm.CommandText = "SELECT * FROM Employees for xml auto";
sqlComm.Connection = sqlCon;
sqlCon.Open();
//then how to write?
XmlReader xr = sqlComm.ExecuteXmlReader();//Is right?
|
|
|
|
|
You can fill a DataSet and use WriteXML() method.
|
|
|
|
|
Hi friend,
I have one datagridview.
-----------------------------------------------------
DataGridView dataGridView1 = new DataGridView();
dataGridView1.Size = new System.Drawing.Size(220, 150);
dataGridView1.TabIndex = 0;
DataGridViewCheckBoxColumn checkboxColumn = new DataGridViewCheckBoxColumn();
checkboxColumn.Name = "CheckBox";
checkboxColumn.Width = 60;
dataGridView1.Columns.Insert(0, checkboxColumn);
dtaGridView1.DataSource = dt; // dt is a datatable ref which have some data from database
----------------------------------
now i want one more column be there for true false value;
for example if datatable return 5 values to datagridview1 it shows all values
but if user check on any of checkbox of any row i want true/false (0,1) value in corresponding third column. whose name would be "TrueFalse".
so how to add another column..
Hope you understand my problem.
Thanks lot.
|
|
|
|
|
add column in DataTable then bind...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi,
I want to communicate to a modem from c# code. If any of you have idea about implementing this please share with me.
Thanks in advance
Prajin
|
|
|
|
|
|
Hello Friends,
I want to create the multilevel tree view in windows application using c#2.0.
I want to add the nodes in tree view form .
If one node has its child then that should be added under that parent node.
Which I am not able to do.
Regards,
rahul saini
|
|
|
|
|
use
TV.Nodes.Add();
to add a node in treeview,
and google, for more info
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|