.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> ASP.Net >> Post New Question Subscribe to Interview Questions

How can I look up a parent class method or property of any System-level object?

Posted By :Shashi Ray     Posted Date :April 07, 2009    Points :10   Category :ASP.Net 
Use the Class View window, accessed from the standard toolbar by clicking View | Class View.

You can also find related Interview Question to How can I look up a parent class method or property of any System-level object?  below: 

Which method is used to serialize an object into an XML document from Xmlserializer class?

  
The "Serialize" method is the first step of serialize process and used to create an XML document (More...)

Can we call a base class method without creating instance?

  
Its possible If its a static method.

Its possible by inheriting from that class also.

Its possible from derived classes using base keyword. (More...)

Are private class-level variables inherited?

  
Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are. (More...)

Are private class-level variables inherited?

  
Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are. (More...)

Can you allow class to be inherited, but prevent the method from being over-ridden?

  
Yes, just leave the class public and make the method sealed. (More...)

How to pass a value from a method to a property procedure in c# win application?

  
Here is my code:

class Jewellery : Connectionstr
{

string lmcode;

public string LM_code//Here i want to access the value of the method(ReadData) i.e displaystring and store the value in to the insert query below.
{
get { return lmcode; }
set { lmcode = value; }

}


string mname;
public string M_Name
{
get { return mname; }
set { mname = value; }
}

string desc;
public string Desc
{
get { return desc; }
set { desc = value; }
}


public string ReadData()
{
OleDbDataReader dr;
string jid = string.Empty;
string displayString = string.Empty;
String query = "select max(LM_code)from Master_Accounts";
Datamanager.RunExecuteReader(Constr, query);

if (dr.Read())
{
jid = dr[0].ToString();
if (string.IsNullOrEmpty(jid))
{
jid = "AM0000";
}
int len = jid.Length;
string split = jid.Substring(2, len - 2);
int num = Convert.ToInt32(split);
num++;
displayString = jid.Substring(0, 2) + num.ToString("0000");
dr.Close();
}
return displayString;//I want to pass this value to the proeprty proc above i.e LM_code.
}

public void add()
{

String query ="insert into Master_Accounts values ('" + LM_code + "','" + M_Name + "'," + "'" + Desc "')";
Datamanager.RunExecuteNonQuery(Constr , query);

} (More...)

Consider the following code:

public class Example extends Thread
{
public void run()
{
System.out.println ("Hello");
}

public static void main (String args[])
{
new Example();
}
}

Select the correct option regarding the preceding code ?

  
1, The code will not compile.
2, The code will compile but will not execute.
3, The code will compile, execute, and display Hello as the output.
4, The code will compile, execute, but will not display anything.

Answer : 4 (More...)

Consider the following two classes:

public class Example1
{
public static int num;
static
{
num=5;
}
}


public class Example2
{
public static void main(String[] args)
{
System.out.println(Example1.num);
}
}

Select the correct option regarding the preceding classes.?

  
1, The Example2 class will execute without any output.
2, The Example2 class will execute with the following output:5

3, The Example2 class will not compile as it does not calls the constructor of the Example 1 class.
4, The Example2 class will not execute as it does not calls the constructor of the Example 1 class.

Answer : 2 (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend