Hi all,
I have built a base class person.vb, which is defined
Public MustInherit Class Person
My second class is called student.vb, which has as its first line
Public Class Student
Inherits Person
I however receive an error in the code here saying, type person is not
defined,
I have obviously overlooked something,
any help apprecaited
thanks
Portroe 5 1198
Some possible causes:
1) Are the 2 classes in the same namespace?
2) Are there any syntax errors in the Person class?
--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"portroe" <bo*@sleigh.com> schreef in bericht
news:uB**************@tk2msftngp13.phx.gbl... Hi all,
I have built a base class person.vb, which is defined
Public MustInherit Class Person
My second class is called student.vb, which has as its first line
Public Class Student Inherits Person
I however receive an error in the code here saying, type person is not defined,
I have obviously overlooked something,
any help apprecaited
thanks
Portroe
Hi,
The definition for Student doesn't come before the End Class of Person does
it?
I've done this before, accidentially defining one class inside another. It
caused
a fair bit of confusion till I spotted it because it auto-syntaxed it, found
in the
object viewer etc...
Regards,
Peter
"portroe" <bo*@sleigh.com> wrote in message
news:uB**************@tk2msftngp13.phx.gbl... Hi all,
I have built a base class person.vb, which is defined
Public MustInherit Class Person
My second class is called student.vb, which has as its first line
Public Class Student Inherits Person
I however receive an error in the code here saying, type person is not defined,
I have obviously overlooked something,
any help apprecaited
thanks
Portroe
"portroe" <bo*@sleigh.com> schrieb I have built a base class person.vb, which is defined
Public MustInherit Class Person
My second class is called student.vb, which has as its first line
Public Class Student Inherits Person
I however receive an error in the code here saying, type person is not defined,
Which namespaces are the classes part of?
--
Armin http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
Okay found it,
it was not in the solution explorer,
so I just added new and pasted code again,
I have no idea how I did this,
thanks
Portroe
Peter Row wrote: Hi,
The definition for Student doesn't come before the End Class of Person does it?
I've done this before, accidentially defining one class inside another. It caused a fair bit of confusion till I spotted it because it auto-syntaxed it, found in the object viewer etc...
Regards, Peter "portroe" <bo*@sleigh.com> wrote in message news:uB**************@tk2msftngp13.phx.gbl...
Hi all,
I have built a base class person.vb, which is defined
Public MustInherit Class Person
My second class is called student.vb, which has as its first line
Public Class Student Inherits Person
I however receive an error in the code here saying, type person is not defined,
I have obviously overlooked something,
any help apprecaited
thanks
Portroe
* portroe <bo*@sleigh.com> scripsit: I have built a base class person.vb, which is defined
Public MustInherit Class Person
My second class is called student.vb, which has as its first line
Public Class Student Inherits Person
I however receive an error in the code here saying, type person is not defined,
I have obviously overlooked something,
1. Are the classes in the same project? If not, set a reference.
2. Are the classes in the same namespace and/or are namespaces
imported? If not, then add them to the same namespace or import the
namespace of the base class.
3. If nothing works, type the 'Person' in the definition of the base
class again (that's a bug which sometimes occurs, don't know why).
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: shine |
last post by:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false"
Inherits="shine.WebForm1" %>
what does Inherits means in this tag, what is the use of it
plz explain me
regards...
|
by: Ben R. |
last post by:
Between ClassName and Inherits, which attribute is set to specify the class
that a page uses? I would think that would be inherits. Further, the
description for ClassName is:
Specifies the class...
|
by: Rob Meade |
last post by:
Hi all,
ok - the scenario...
We have a secure login page known as the Clinical Portal (single login
etc) - we have a web user control for this which checks if a session is
available or not...
|
by: Todd A |
last post by:
If I use the following in my code behind page:
Public Class _Default
Inherits System.Web.UI.Page
The page will compile with no errors from the command line compiler
(vbc.exe)
But, If I...
|
by: Alex Nitulescu |
last post by:
Hi, I have the following in project "RaducuCustomControls":
Imports System.ComponentModel
Imports System.Web.UI
<DefaultProperty("Text"), ToolboxData("<{0}:Rotator1...
|
by: Roberto Bindini |
last post by:
Hi
with visual studio 2005 beta 2 i have created two form:
frm1 (Inherits System.Web.UI.Page)
frm2 (Inherits frm1)
but in the line code :
Inherits frm1
vs send error: type frm1 is not defined
|
by: Tony Abate |
last post by:
I am working on an ASP.NET app that is going well except for one thing. I
build my application and then move the .aspx file to a different directory. I
can point the Codebehind property back to the...
|
by: Don |
last post by:
1. Say I have three classes: A, B and C.
2. Class A can only be inherited, and B inherits it. C does not inherit
anything.
3. I have a function that can have an object passed to it. Either B...
|
by: Stacey Levine |
last post by:
I have a webservice that I wanted to return an ArrayList..Well the service
compiles and runs when I have the output defined as ArrayList, but the WSDL
defines the output as an Object so I was...
|
by: Arpan |
last post by:
What's the difference between "Imports" & "Inherits"? For e.g. both the
codes below work without any errors:
Imports System
Imports System.Data
Imports System.Web.UI
Namespace Constructors...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |