TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Asim Poptani
NA
3
68.6k
The name does not exist in the current context (Error)
Dec 17 2013 4:14 PM
Here is my code where I'm getting error, The name does not exist in the current context.
Person.cs no errors:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Firstpro.People
{
public class Person
{
public string Firstname
{
get;
private set;
}
public string Lastname
{
get;
private set;
}
public Person(string firstname, string lastname)
{
Firstname = firstname;
Lastname = lastname;
}
public string RetrieveData (Person person)
{
StringBuilder bulid = new StringBuilder();
bulid.Append(Firstname +" "+ Lastname);
return bulid.ToString();
}
}
}
Customer.cs (
error saying Error1The name 'firstname' does not exist in the current context
):
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Firstpro.People
{
public class customer : Person
{
public customer(string username, string lastname = "") : base(
firstname
, lastname)
{
Console.WriteLine(username);
}
}
}
Reply
Answers (
3
)
how to play Videos in asp.net 2.0
data types