473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Help me with this error message

when i am writing a program in c# using windows app I am getting this error
message as System.Windows.Forms.Control.Text is inaccessable due to its
protection level.

In the design window when i am placing some controls like textbox,label and
button.---my code the code displayed is as follows

public class form1:system.windows.forms.form
{
private system.windows.forms.button button1;
private system.windows.forms.button button2;

Why is it taking private automatically??

Help me out

May 2 '06 #1
2 1349
> when i am writing a program in c# using windows app I am getting this
error
message as System.Windows.Forms.Control.Text is inaccessable due to its
protection level.
System.Windows.Forms.Control.text is inaccessible, System.Windows.Forms.Text
is a public property, so it's definitely accessible.
Why is it taking private automatically?? Because private is the implicit access modifier set in form designer.
You can change implicit access modifiers given to controls on your designed
form in the property grid when designing the form.

"amita" <am***@discussions.microsoft.com> wrote in message
news:B1**********************************@microsof t.com... when i am writing a program in c# using windows app I am getting this
error
message as System.Windows.Forms.Control.Text is inaccessable due to its
protection level.

In the design window when i am placing some controls like textbox,label
and
button.---my code the code displayed is as follows

public class form1:system.windows.forms.form
{
private system.windows.forms.button button1;
private system.windows.forms.button button2;

Why is it taking private automatically??

Help me out

May 2 '06 #2
amita,

Control.Text property is accessible because it is public. Can you post the
exact error text.
--
Stoitcho Goutsev (100)

"amita" <am***@discussions.microsoft.com> wrote in message
news:B1**********************************@microsof t.com...
when i am writing a program in c# using windows app I am getting this
error
message as System.Windows.Forms.Control.Text is inaccessable due to its
protection level.

In the design window when i am placing some controls like textbox,label
and
button.---my code the code displayed is as follows

public class form1:system.windows.forms.form
{
private system.windows.forms.button button1;
private system.windows.forms.button button2;

Why is it taking private automatically??

Help me out

May 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
5
by: Marc Violette | last post by:
<Reply-To: veejunk@sympatico.ca> Hello, I'm hoping someone can help me out here... I'm a beginner ASP.NET developper, and am trying to follow a series of exercises in the book entitled...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
9
by: Ringo | last post by:
the LeafProject http://www.leafproject.org has a DLL for Face recognition. it is written in C++ but they interface to it from Lisp. I want to interface to it from C#. Their Lisp definitions looks...
11
by: tracy | last post by:
Hi, I really need help. I run this script and error message appeal as below: drop trigger log_errors_trig; drop trigger log_errors_trig ERROR at line 1: ORA04080: trigger 'LOG_ERRORS-TRIG'...
12
by: =?Utf-8?B?ZGdvdw==?= | last post by:
I designed a "contact_us" page in visual web developer 2005 express along with EW2 after viewing tutorials on asp.net's help page. Features work like they should, but I cannot figure out how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.