Click here to Skip to main content
15,921,156 members
Home / Discussions / C#
   

C#

 
GeneralRe: south african phone number validation Pin
OriginalGriff9-Apr-10 0:28
mveOriginalGriff9-Apr-10 0:28 
AnswerRe: south african phone number validation Pin
O.Phil8-Apr-10 23:30
O.Phil8-Apr-10 23:30 
GeneralRe: south african phone number validation Pin
Morgs Morgan8-Apr-10 23:42
Morgs Morgan8-Apr-10 23:42 
QuestionCapture AJAX calls (or data) from webpage Pin
kaytrance8-Apr-10 21:03
kaytrance8-Apr-10 21:03 
AnswerWrong Forum Pin
Keith Barrow8-Apr-10 23:07
professionalKeith Barrow8-Apr-10 23:07 
QuestionSmooth scrolling scrollbars Pin
jabbawok8-Apr-10 14:27
jabbawok8-Apr-10 14:27 
AnswerRe: Smooth scrolling scrollbars Pin
Gaurav Dudeja India8-Apr-10 20:13
Gaurav Dudeja India8-Apr-10 20:13 
GeneralRe: Smooth scrolling scrollbars Pin
N a v a n e e t h8-Apr-10 20:59
N a v a n e e t h8-Apr-10 20:59 
AnswerRe: Smooth scrolling scrollbars Pin
Ravi Bhavnani8-Apr-10 21:43
professionalRavi Bhavnani8-Apr-10 21:43 
Questioncreate public variables at run time Pin
Jassim Rahma8-Apr-10 13:36
Jassim Rahma8-Apr-10 13:36 
AnswerRe: create public variables at run time Pin
PIEBALDconsult8-Apr-10 14:01
mvePIEBALDconsult8-Apr-10 14:01 
GeneralRe: create public variables at run time Pin
Jassim Rahma8-Apr-10 14:15
Jassim Rahma8-Apr-10 14:15 
AnswerRe: create public variables at run time Pin
Not Active8-Apr-10 14:39
mentorNot Active8-Apr-10 14:39 
GeneralRe: create public variables at run time Pin
Jassim Rahma9-Apr-10 11:52
Jassim Rahma9-Apr-10 11:52 
GeneralRe: create public variables at run time Pin
Not Active9-Apr-10 14:04
mentorNot Active9-Apr-10 14:04 
AnswerRe: create public variables at run time Pin
NavnathKale10-Apr-10 0:56
NavnathKale10-Apr-10 0:56 
GeneralRe: create public variables at run time Pin
Jassim Rahma10-Apr-10 12:02
Jassim Rahma10-Apr-10 12:02 
how can I have the hashtable as public? I tried the following but not working!

my public class is:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace cure_hospital_management
{
    class public_class
    {
        private Hashtable _sysem_parameters;

        // startup_status;
        public Hashtable sysem_parameters
        {
            get { return _sysem_parameters; }
            set { _sysem_parameters = value; }
        }
    }
}


my code in the mail form load is:
<pre>public_class public_var = new public_class();

private void get_system_parameters2()
{
public_var.sysem_parameters = new Hashtable();
public_var.sysem_parameters.Add("Name", "Jassim Rahma");
}
</pre>

and my code to read the value is:
<pre>MessageBox.Show((string)public_var.sysem_parameters["Name"]);</pre>


but I am getting this error when reading the value:
Object reference not set to an instance of an object.
GeneralRe: create public variables at run time Pin
NavnathKale10-Apr-10 21:49
NavnathKale10-Apr-10 21:49 
Questionkeep one sqlconnection alive Pin
Jassim Rahma8-Apr-10 13:31
Jassim Rahma8-Apr-10 13:31 
AnswerRe: keep one sqlconnection alive Pin
PIEBALDconsult8-Apr-10 13:59
mvePIEBALDconsult8-Apr-10 13:59 
GeneralRe: keep one sqlconnection alive Pin
Jassim Rahma8-Apr-10 14:14
Jassim Rahma8-Apr-10 14:14 
GeneralRe: keep one sqlconnection alive Pin
PIEBALDconsult8-Apr-10 17:11
mvePIEBALDconsult8-Apr-10 17:11 
GeneralRe: keep one sqlconnection alive Pin
Dave Kreskowiak8-Apr-10 17:48
mveDave Kreskowiak8-Apr-10 17:48 
AnswerRe: keep one sqlconnection alive Pin
Not Active8-Apr-10 14:13
mentorNot Active8-Apr-10 14:13 
AnswerRe: keep one sqlconnection alive Pin
N a v a n e e t h8-Apr-10 16:21
N a v a n e e t h8-Apr-10 16:21 

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.