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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Class with recursive call to that calss.

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :ASP.Net
 
Dear all,I have a class with a property who is a recursive call to the same type of Class. Is this a correct way of working ?The code :public class DataObject { public string Name { get; set; } public string DataType { get; set; } public int IntValue { get; set; } public string StrValue { get; set; } public DataObject DataValue { get; set; } public DataObject() { Name = string.Empty; DataType = string.Empty; IntValue = 0; StrValue = string.Empty; DataValue = new DataObject(); } } I got an abort exception while creating an object from this class.


View Complete Post


More Related Resource Links

call c# class from sqlserver

  
Hi,How I can call a c# class from sqlserver

How to call to class by clicking button?

  
Hi. I add new class  to my project via "add --new item--class" now i wont to call added class by clicking button. how i do that? for example there is button click   private void button5_Click(object sender, RoutedEventArgs e) {   }

how to jquery call a other call function other class is not static

  
how to jquery call a other call function other class is not static[WebMethod]    public static bool Verify(string username, string password)    {        //Do your logic with username, password  here        //I am just checking with admin/admin credentials            Console.WriteLine("Ritu");        string s="SELECT p.RETMSG FROM P_DOCSHARE(1001,1453,'1002,1012,1011','Add') P";                 CCUtility c;                c=new CCUtility();             c.JavascriptMessage(c.Insert_P(s));        return (username == "admin" && password == "admin");    }

How to use ajax for recursive call of a function in asp classic

  

I have a asp page with parent and child relation  task when i click on + sign the task with the parent id of the first should open. it may go up to nth level

e.g 

1 >2

1>3

2>4

2>5

2>6

5>7

7>8

so to go to 8 we have 1>2>5>7>8

so first i have to click on 1 which will open its child then i have to select 2 which opens its child.

If i am doing it on same page recursively it hits performance.

as it is a asp page and each time it is hiting the server so i have to use ajax and build the page out side and append this to my parent page 

can any one help me in this regards,

 


Please Mark the answers and give points it will help users Thanks & Regards, Kamal Agarwala

How to call a ajax recursive function

  

I have a asp page with parent and child relation  task when i click on + sign the task with the parent id of the first should open. it may go up to nth level

e.g 

1 >2

1>3

Call each class in folder

  

Hi all,

I'm developing an application that needs to be very easily maintained. Currently, the program calls a boolean function, which determines if a given set of criteria are met, and then if true... increments a counter.  Afterwards, it moves on to the next function, until all 9 funcitons have been called and the counter now set anywhere between 0-8.

I would like to put each function in a class file, within a subfolder.  IE:  Main Application -> Service1.asmx -> DataCriteria (folder) -> OverLimit, UnitExpired, AddressUnavailable, etc. etc. etc.

Then, have a method (using reflection or whatever means possible) that will loop through each .vb (class) file in the DataCriteria folder, and run its Main function to get the boolean.  This would mean that the calling application does not care how many classes exist in that folder, it checks each class.  And if new criteria needs to be added, i just create a new class and plop it into that folder, without having to edit any code files.

Of course, each class within the DataCriteria folder would need to implement an interface, to verify that they each have the same method type...

any ideas / suggestions?

Thanks,


How can i call custom class in my sharepoint page

  
Hi,

   I created a class file inheride with Page class. I wrote load event in that class file how can i call that in my Newform.aspx in my sharepoint list.

Derived class and try call private/protected base member

  

Hi, i often write a class derived from built in .NET class.

Unfortunately, there are many methods/properties/fields that marked private/internal (i decompile using net reflector),
so i call the members using reflection (get method/field/property, invoke method).

The reflection is damn slow!

Anyone knows how to solve my problem? Or have alternate method instead of using reflection?

 

*** the sealed, internal, and private keywords is enemy for me, it prevents the developer for derivering a class/type.


call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Using jQuery to directly call ASP.NET AJAX page methods

  
Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

Class Diagrams

  
Class diagrams show the static structure of the systems. Classes define the properties of the objects which belong to them. These include:

Attributes - (second container) the data properties of the classes including type, default value and constraints.

Creating a Simple Class in C#

  
The second article in the C# Object-Oriented Programming tutorial describes how classes are created in C# and how behaviour, in the form of publicly visible and private, hidden methods can be added. This demonstrates some of the uses of encapsulation

Static Class for Beginners

  
In general, the members of a class can be accessed by instance of that class when they are in public, but there comes a situation to access or call members of a class without an instance and this can be achieved by declaring them as static

How to call an .exe file in .net

  
Sometimes a developer has to call an EXE from another EXE. While calling EXE there can be a requirement to pass parameter.

abstract away the source of the connection string using a class with a static property.

  
ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Encapsulation
Let's abstract away the source of the connection string using a class with a static property.

MessageQueue Class

  
This sample demonstrates two way communications using message queuing between a device application and a desktop application. One application sends book order messages to a message queue and another application receives these book orders from the message queue and responds to the device queue that the orders have been processed.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

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