Solved

Phone 8 App declare public variable

Posted on 2014-01-22
1
234 Views
Last Modified: 2014-01-22
I need to declare a public sting array that can be called by any procedure.

Where do I insert this code?

          string[,] arrDeck = new string[3, 3];
            arrDeck[0, 0] = "C1C2";
            arrDeck[0, 1] = "Not Recommended";
            arrDeck[0, 2] = "10 Pct";

ie:

    void cmdGetHint_Tap(object sender,
                     System.Windows.Input.GestureEventArgs e)
        {
            txtPreFlopHint.Text = arrDeck[0, 1] + "  " + arrDeck[0,2] ;
        }

Thanks,
0
Comment
Question by:Dovberman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
Dovberman earned 0 total points
ID: 39800839
I found out how to do it.

namespace PhoneApp5
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Declare array  
        public string[,] arrDeck = new string[3, 3];
 
        // Constructor
        public MainPage()
        {
            InitializeComponent();

           // populate multidimension array (two dimensions)
            arrDeck[0, 0] = "C1C2";
            arrDeck[0, 1] = "Not Recommended";
            arrDeck[0, 2] = "10 Pct";
        }
0

Featured Post

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question