VBA to C# with statement


This question already has an answer here:


As HighCore said, there's no C# equivalent to VB's With block. Here's the equivalent C# code:

myRow = ProductRangeA.Rows.Count;
myValue = ProductRangeA.Value;

myRow = ProductRangeB.Columns.Count;
myValue = ProductRangeB.Value;

Since you can't avoid typing ProductRangeA and ProductRangeB twice each, you can reduce typing by using shorter variable names. That can make the code more difficult to understand, of course.

Need Your Help

check before adding into database

android database eclipse sqlite

i have this code which is supposed to search before adding an book by checking its isbn number

Different ways to specify libraries to gcc/g++

gcc g++ linker libraries

I'd be curious to understand if there's any substantial difference in specifying libraries (both shared and static) to gcc/g++ in the two following ways (CC can be g++ or gcc)