D
dot Net Pa Ji
In VB.Net, Lines between A and B can be replaced with Lines between C and D
is there something in C# like this (With... End With) ??
---Line A------------------------------------------------------------
--vb.net code
objCMD.CommandText = "select * from ..."
objCMD..CommandType = CommandType.Text
...... ............... .............. ................. ...................
...... ............... .............. ................. ...................
---Line B------------------------------------------------------------
---Line C------------------------------------------------------------
--vb.net code
With objCMD
.CommandText = "select COUNT(*) from Customers WHERE COUNTRY=
@COUNTRY AND CITY = @CITY"
.CommandType = CommandType.Text
....
.....
End With
---Line D------------------------------------------------------------
--C# code
objCMD.CommandText ="select * from ";
objCMD.CommandType = CommandType.Text;
Thanks in advance
-----
is there something in C# like this (With... End With) ??
---Line A------------------------------------------------------------
--vb.net code
objCMD.CommandText = "select * from ..."
objCMD..CommandType = CommandType.Text
...... ............... .............. ................. ...................
...... ............... .............. ................. ...................
---Line B------------------------------------------------------------
---Line C------------------------------------------------------------
--vb.net code
With objCMD
.CommandText = "select COUNT(*) from Customers WHERE COUNTRY=
@COUNTRY AND CITY = @CITY"
.CommandType = CommandType.Text
....
.....
End With
---Line D------------------------------------------------------------
--C# code
objCMD.CommandText ="select * from ";
objCMD.CommandType = CommandType.Text;
Thanks in advance
-----