Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
GeneralRe: HDD Serial Number Pin
Socheat.Net11-Feb-09 14:07
Socheat.Net11-Feb-09 14:07 
QuestionHelp for someone whos memory is going fast. Pin
Henry Minute10-Feb-09 12:56
Henry Minute10-Feb-09 12:56 
AnswerRe: Help for someone whos memory is going fast. Pin
Alan N10-Feb-09 13:41
Alan N10-Feb-09 13:41 
GeneralRe: Help for someone whos memory is going fast. Pin
Henry Minute10-Feb-09 13:46
Henry Minute10-Feb-09 13:46 
QuestionWhich Is Better - Signed or Unsigned Assemblies? Pin
BlitzPackage10-Feb-09 11:00
BlitzPackage10-Feb-09 11:00 
AnswerRe: Which Is Better - Signed or Unsigned Assemblies? Pin
je_gonzalez10-Feb-09 11:46
je_gonzalez10-Feb-09 11:46 
AnswerRe: Which Is Better - Signed or Unsigned Assemblies? Pin
#realJSOP10-Feb-09 23:38
professional#realJSOP10-Feb-09 23:38 
QuestionHow to use a string or char array to refer to a control Pin
t_feras10-Feb-09 10:41
t_feras10-Feb-09 10:41 
Hello,

I am trying to build an application where I can navigate through a series of images (either forward or backward). For example, if the "forward" button is pressed, the current displayed image is collapsed and the next image will be displayed. In my application, the image control names for these images are: Image1, Image2, Image3, etc.

I currently have over 150 images that I am trying to manipulate. I'd like to find a way to use a string or char array to refer to the image control name. So far I have no luck as I am not very familiar with C#. I copied below a snippet of what I am trying to do:

private void ShowPreviousImage()
{
//proceed backward to show the previous image
string currentImage;
string nextImage;
char [] buf;
if (imagePosition > 0) //imagePosition is the index of the image that is currently displayed
{
currentImage = "image" + imagePosition;
nextImage = "image" + (imagePosition -1);
buf = currentImage.ToCharArray();
buf.Visibility = System.Windows.Visibility.Collapsed;
//Error generated: ‘System.Array’ doesnot contain a definition for ‘Visibility’ and no extension
//method ‘Visibility’ accepting a first argument of type ‘System.Array’ could be found…

//Same thing I get when I use the original string as shown below

currentImage.Visibility = System.Windows.Visibility.Collapsed;
//Error generated ‘String’ doesnot contain a definition for ‘Visibility’ and no extension
//method ‘Visibility’ accepting a first argument of type ‘System.Array’ could be found…

imagePosition--;
}
}

Any help will be appreciated.

Regards,
AnswerRe: How to use a string or char array to refer to a control Pin
Christian Graus10-Feb-09 12:43
protectorChristian Graus10-Feb-09 12:43 
AnswerRe: How to use a string or char array to refer to a control Pin
Henry Minute10-Feb-09 12:49
Henry Minute10-Feb-09 12:49 
GeneralRe: How to use a string or char array to refer to a control Pin
t_feras10-Feb-09 13:13
t_feras10-Feb-09 13:13 
GeneralRe: How to use a string or char array to refer to a control Pin
Henry Minute10-Feb-09 13:53
Henry Minute10-Feb-09 13:53 
QuestionParsing at end of line with split function Pin
alwaysthinking10-Feb-09 10:18
alwaysthinking10-Feb-09 10:18 
AnswerRe: Parsing at end of line with split function Pin
mav.northwind10-Feb-09 10:29
mav.northwind10-Feb-09 10:29 
AnswerRe: Parsing at end of line with split function Pin
Guffa10-Feb-09 10:37
Guffa10-Feb-09 10:37 
QuestionDataSet columns Pin
ziwez010-Feb-09 8:39
ziwez010-Feb-09 8:39 
AnswerRe: DataSet columns Pin
Wendelius10-Feb-09 8:47
mentorWendelius10-Feb-09 8:47 
GeneralRe: DataSet columns Pin
ziwez010-Feb-09 8:54
ziwez010-Feb-09 8:54 
GeneralRe: DataSet columns Pin
Wendelius10-Feb-09 9:04
mentorWendelius10-Feb-09 9:04 
AnswerRe: DataSet columns Pin
Mycroft Holmes10-Feb-09 13:28
professionalMycroft Holmes10-Feb-09 13:28 
QuestionGet "Input string was not in a correct format" exception when calling OdbcConnection's getSchema("Columns") for Oracle 9i database Pin
stilz10-Feb-09 8:11
stilz10-Feb-09 8:11 
AnswerRe: Get "Input string was not in a correct format" exception when calling OdbcConnection's getSchema("Columns") for Oracle 9i database Pin
Wendelius10-Feb-09 8:26
mentorWendelius10-Feb-09 8:26 
GeneralRe: Get "Input string was not in a correct format" exception when calling OdbcConnection's getSchema("Columns") for Oracle 9i database Pin
stilz10-Feb-09 8:53
stilz10-Feb-09 8:53 
GeneralRe: Get "Input string was not in a correct format" exception when calling OdbcConnection's getSchema("Columns") for Oracle 9i database Pin
Wendelius10-Feb-09 9:06
mentorWendelius10-Feb-09 9:06 
GeneralRe: Get "Input string was not in a correct format" exception when calling OdbcConnection's getSchema("Columns") for Oracle 9i database Pin
stilz11-Feb-09 10:06
stilz11-Feb-09 10:06 

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.