Click here to Skip to main content
15,915,328 members
Home / Discussions / C#
   

C#

 
QuestionStrings and Interop Pin
Beringer26-Jan-06 9:27
Beringer26-Jan-06 9:27 
AnswerRe: Strings and Interop Pin
Beringer26-Jan-06 9:50
Beringer26-Jan-06 9:50 
GeneralRe: Strings and Interop Pin
Andy Moore26-Jan-06 11:17
Andy Moore26-Jan-06 11:17 
GeneralRe: Strings and Interop Pin
Beringer26-Jan-06 17:52
Beringer26-Jan-06 17:52 
AnswerRe: Strings and Interop Pin
James Gupta26-Jan-06 10:59
professionalJames Gupta26-Jan-06 10:59 
AnswerRe: Strings and Interop Pin
DigitalKing26-Jan-06 14:36
DigitalKing26-Jan-06 14:36 
GeneralRe: Strings and Interop Pin
Beringer26-Jan-06 15:27
Beringer26-Jan-06 15:27 
QuestionHelp with Code conversion Pin
TMF32026-Jan-06 7:11
TMF32026-Jan-06 7:11 
I recently recieved a snipit of code from a friend that contained a character I was unfamiliar with and in fact that my conversion tool was unfamiliar with as well.

The code contained a charcter of pipes (||) used to represent an "OR" argument. The original code was written in VB.

Can someone tell me the equivilent of || for the "OR" argument in C#?

Here is the line of code:
<br />
//N.B. I am using VB.NET most of the time, so my C# syntax may not be 100% correct <br />
sub void Customers1_ItemDataBound(Object sender, RepeaterItemEvenArgs e) <br />
{ <br />
<br />
//NOTICE: you might need to adjust this line of code accordingly if you include the nested Repeaters in the <SeperatorTemplate> <br />
if (e.Item.ItemType = ListItemType.Item) || (e.Item.ItemType = ListItemType.AlternatingItem) <br />
<br />
{ <br />
//This is to look for the Customers2 repeater that is nested inside the Customers1 repeater <br />
Repeater oRpt = (Repeater) e.Item.FindControl("Customers2") <br />
DataRowView oDrv = e.Item.DataItem <br />
<br />
'Bind item repeater <br />
//This line is to retrieve only the records in the CTPT table that have the same ItemID as the HSCTI record in the current row <br />
oRpt.DataSource = oDrv.CreateChildView("ItemID") <br />
oRpt.DataBind <br />
end if <br />
} <br />
<br />
//Similarly, to show all the related comments on the Customers2 repeater, you include code in the Customers2_ItemDataBound() event <br />
sub void Customers2_ItemDataBound(Object sender, RepeaterItemEvenArgs e) <br />
{ <br />
<br />
//NOTICE: and this line of code as well <br />
if (e.Item.ItemType = ListItemType.Item) || (e.Item.ItemType = ListItemType.AlternatingItem) <br />
<br />
<br />
{ <br />
//This is to look for the Customers3 repeater that is nested inside the Customers2 repeater <br />
Repeater oRpt = (Repeater) e.Item.FindControl("Customers3") <br />
DataRowView oDrv = e.Item.DataItem <br />
<br />
'Bind item repeater <br />
//This line is to retrieve only the records in the CTPT table that have the same ItemID as the HSCTI record in the current row <br />
oRpt.DataSource = oDrv.CreateChildView("ct_number") <br />
oRpt.DataBind <br />
end if <br />
} <br />


Thank you for your help.

Sincerely,

Tim
AnswerRe: Help with Code conversion Pin
Guffa26-Jan-06 7:24
Guffa26-Jan-06 7:24 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 7:46
TMF32026-Jan-06 7:46 
GeneralRe: Help with Code conversion Pin
Dan Neely26-Jan-06 8:29
Dan Neely26-Jan-06 8:29 
GeneralRe: Help with Code conversion Pin
Dave Kreskowiak26-Jan-06 8:39
mveDave Kreskowiak26-Jan-06 8:39 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 8:01
TMF32026-Jan-06 8:01 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 8:34
TMF32026-Jan-06 8:34 
AnswerRe: Help with Code conversion Pin
James Gupta26-Jan-06 7:40
professionalJames Gupta26-Jan-06 7:40 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 9:46
TMF32026-Jan-06 9:46 
GeneralRe: Help with Code conversion Pin
James Gupta26-Jan-06 10:23
professionalJames Gupta26-Jan-06 10:23 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 10:29
TMF32026-Jan-06 10:29 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 11:24
TMF32026-Jan-06 11:24 
GeneralRe: Help with Code conversion Pin
Dan Neely26-Jan-06 11:29
Dan Neely26-Jan-06 11:29 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 11:41
TMF32026-Jan-06 11:41 
GeneralRe: Help with Code conversion Pin
James Gupta26-Jan-06 12:02
professionalJames Gupta26-Jan-06 12:02 
GeneralRe: Help with Code conversion Pin
TMF32026-Jan-06 12:39
TMF32026-Jan-06 12:39 
GeneralRe: Help with Code conversion Pin
TMF32027-Jan-06 2:43
TMF32027-Jan-06 2:43 
QuestionA transparent label? Pin
drc_no126-Jan-06 6:57
drc_no126-Jan-06 6:57 

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.