Submit Blog Login Last Submitted Blogs RSS Archive Contact  
dot net made easy
 
 
 
dot net made easy
real time questions, dot net frame work,microsoft dot net,dot net tutorial, dot net certification ,debugging,dot net tips,dot net programes,dot net lessons,dot net faq\\\\\\\'s,interview questions.
Language: English
RSS Feeds for this Blog
Statistics
Unique Visitors: 0
Total Unique Visitors: 90
Visitors Out: 684
Total Visitors Out: 684
 
 
Articles
LEASE AND RENUAL CALL TIME
2008-07-20 08:47:00
........................................................................................In normal .NET environment objects lifetime is managed by garbage collector. But in remoting environment remote clients can access objects which are out of control of garbage collector. Garbage collector boundary is limited to a single PC on which framework is running; any remote client across physical PC is out of control of GC (Garbage Collector).This constraint of garbage collector leads to a new way of handling lifetime for remoting objects, by using concept called as “LeaseTime”. Every server side object is assigned by default a “LeaseTime” of five minutes. This leasetime is decreased at certain intervals.Again for every method call a default of two minutes ...
 
FAQ'S ON WEB SERVICING PART ONE
2008-07-18 09:19:00
Application domainPreviously “PROCESS” where used as security boundaries. One process has its own virtual memory and does not over lap the other process virtual memory; due to this one process can not crash the other process. So any problem or error in one process does not affect the other Process. In .NET they went one step ahead introducing application domains.In application domains multiple applications can run in same process with out Influencing each other. If one of the application domains throws error it does not affect the other application domains. To invoke method in a object running in different application domain .NET remoting is used..NET Remoting.NET remoting is replacement of DCOM. Using .NET remoting you can make remote object calls which lie in different Application D...
 
Threading FAQ'S for Dot Net
2008-07-11 20:29:00
What is Multi-tasking ?It’s a feature of modern operating systems with which we can run multiple programs at same time example Word, Excel etc.What is Multi-threading ?Multi-threading forms subset of Multi-tasking. Instead of having to switch between programs this feature switches between different parts of the same program. Example you are writing in word and at the same time word is doing a spell check in background.What is a Thread ?A thread is the basic unit to which the operating system allocates processor time.Did VB6 support multi-threading ?While VB6 supports multiple single-threaded apartments, it does not support a free threading model, which allows multiple threads to run against the same set of data.Can we have multiple threads in one App ...
 
DCOM AND MICROSOFT DOTNET
2008-07-10 09:01:00
DCOM differs from COM in that it allows for creating objects distributed across a network, a Protocol for invoking that object’s methods, and secures access to the object. DCOM provides awrapper around COM, hence it is a backwards compatible extension.DCOM uses Remote Procedural Calls (RPC) using Open Software Foundation’s Distributed Computing Environment.These RPC are implemented over TCP/IP and named pipes. The protocol which is actually beingused is registered just prior to use, as opposed to being registered at initialization time. The reason for this is that if a protocol is not being used, it will not be loaded.In order to inform an object that the client is still alive, periodic pinging is used. Hence, when theclient has died and no ping has been received (to refresh it) before...
 
CODEDOM in Dot Net Technology
2008-07-06 10:02:00
“CodeDom” is an object model which represents actually a source code. It is designed to belanguage independent - once you create a “CodeDom” hierarchy for a program we can thengenerate the source code in any .NET compliant language. So let’s try to do something realpractical and simple to just get a feel of how powerful “CodeDom” is.Note :- You can get the source code in CD in “CodeDom” folder.We will try to generate the following code below. The below code which will be generated doesnot do anything special buy just displays a hello message and waits for the key to be pressed.The “Codedom” folder in the CD has one “GenerateCode” method which returns“CodeCompileUnit” object. “CodeDom” is nothing but a full DOM model where every objectin the structure repre...
 
Native Image Generator in Microsoft dot net
2008-07-05 08:52:00
The Native Image Generator utility (Ngen.exe) allows you to run the JIT compiler on your assembly'sMSIL and generate native machine code which is cached to disk.After the image is created .NETruntime will use the image to run the code rather than from the hard disk. Running Ngen.exe onan assembly potentially allows the assembly to load and execute faster, because it restores codeand data structures from the native image cache rather than generating them dynamically.Below are some points to be remembered for Native Image Generator:-√Native images load faster than MSIL because JIT compilation and type-safety verificationis eliminated.√If you are sharing code between process Ngen.exe improves the performancesignificantl...
 
DOT NET FAQ'S ON GARBAGE COLLECTION
2008-06-26 08:05:00
What is Delay signing ? During development process you will need strong name keys to be exposed to developer which is not a good practice from security aspect point of view.In such situations you can assign the key later on and during development you an use delay signing Following is process to delay sign an assembly: √ First obtain your string name keys using SN.EXE. √ Annotate the source code for the assembly with two custom attributes from System.Reflection: AssemblyKeyFileAttribute, which passes the name of the file containing the public key as a parameter to its constructor. AssemblyDelaySignAttribute, which indicates that delay signing, is being used by passing true as a parameter to its constructor. For example as shown below: [Visual Basic] [C#] [assembly:AssemblyKeyFileAttribute("myKey.snk")] [assembly:AssemblyDelaySignAttribute(true)] The compiler inserts the public key into the assembly manifest and reserves space in the PE file for the full strong name signat...
 
Dot net FAQ's on Manifest and Assemblies
2008-06-25 06:54:00
What is Manifest? Assembly metadata is stored in Manifest. Manifest contains all the metadata needed to do the following things : √ Version of assembly √ Security identity √ Scope of the assembly √ Resolve references to resources and classes. √ The assembly manifest can be stored in either a PE file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a stand-alone PE file that contains only assembly manifest information. Where is version information stored of an assembly ? Version information is stored in assembly in manifest. (I)Is versioning applicable to private assemblies? Versioning concept is only applicable to global assembly cache (GAC) as private assembly lie in their individual folders. What is GAC ? Twist :- What are situations when you register .NET assembly in GAC ? GAC (Global Assembly Cache) is used where shared .NET assembly reside. GAC is used in the following situations :- √ If the application has to be shared among sever...
 
Dot net Interview Questions on Assebblies
2008-06-23 05:02:00
What is a Assembly? √ Assembly is unit of deployment like EXE or a DLL. √ An assembly consists of one or more files (dlls, exe’s, html files etc.), and represents a group of resources, type definitions, and implementations of those types. An assembly may also contain references to other assemblies. These resources, types and references are described in a block of data called a manifest. The manifest is part of the assembly, thus making the assembly self-describing. √ An assembly is completely self-describing.An assembly contains metadata information, which is used by the CLR for everything from type checking and security to actually invoking the components methods. As all information is in the assembly itself, it is independent of registry. This is the basic advantage as compared to COM where the version was stored in registry. √ Multiple versions can be deployed side by side in different folders. These different versions can execute at the same time without interferi...
 
DOT NET FRAME WORK FAQ ONE
2008-06-22 11:03:00
(IL)Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is compiled to IL. This IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler. What is a CLR? Full form of CLR is Common Language Runtime and it forms the heart of the .NET framework. All Languages have runtime and its the responsibility of the runtime to take care of the code execution of the program. For example VC++ has MSCRT40.DLL,VB6 has MSVBVM60.DLL, Java has Java Virtual Machine etc. Similarly .NET has CLR. Following are the responsibilities of CLR. √ Garbage Collection :- CLR automatically manages memory thus eliminating memory leaks. When objects are not referred GC automatically releases those memories thus providing efficient memory management. √ Code Access Security :- CAS grants rights to program depending on the security configuration of the machine...
 
HR QUESTIONS FOR DOT NET INTERVIEW
2008-06-21 00:54:00
One of the first questions asked during interview is “Can you say something aboutyourself ”?√ Can you describe about your self and what you have achieved till now?√ Why do you want to leave the current company?√ Where do you see yourself after three years?What are your positive and negative points?√ How much do you rate yourself in .NET and SQL Server in one out of ten?√ Are you looking for onsite opportunities? (Be careful do not show your desperation of abroad journeys)√ Why have you changed so many jobs? (Prepare a decent answer do not blame companies and individuals for your frequent change).√ Never talk for more than 1 minute straight during interview.√ Have you worked with previous version o...
 
Salary Negotiation for a Software Job
2008-06-18 06:52:00
Do a study of what is the salary trend? For instance have some kind of baseline. For example what is the salary trend on number of year of experience? Discuss this with your friends out.√ Do not mention your expected salary on the resume?√ Let the employer first make the salary offer. Try to delay the salary discussion till theend.√ If they say what you expect ?, come with a figure with a little higher end and say negotiable. Remember never say negotiable on something which you have aimed, HR guys will always bring it down. So negotiate on AIMED SALARY + some thing extra.√ The normal trend is that they look at your current salary and add a little it so that they can pull you in. Do your home work my salary is this much and I expect this much so wh...
 
Resume preparation for software jobs
2008-06-17 10:01:00
Use plain text when you are sending resumes through email.√ Attach a covering letter it really impresses and makes you look traditionally formal.Yes, even if you are sending your CV through email send a covering letter.Check list Start with an objective or summary, for instance, “Working as a Senior Database administrator for more than 4 years. Implemented quality web based application.Follow the industry’s best practices and adhered and implemented processes, which enhanced the quality of technical delivery. Pledge to deliver the best technical solutions to the industry.”√ Specify your Core strengths at the start of the resume by which the interviewer can make a quick decision are you eligible for the position.This is also a good position to specify your objective or position w...
 
Software Company Hirachy
2008-06-15 03:57:00
Following are the number of years of experience according to position.√ Junior engineers are specially fresher and work under software engineers.√ Software engineers have around 1 to 2 years of experience. Interviewer expects software engineers to be technically at a medium level.√ Senior Software Engineers have around 2 to 4 years of experience. Interviewer expects them to technically be very strong.√ Project leads should handle majority technical aspect of project and should have around 4 to 8 years of experience. They are also indirect architect of the project. Interviewer expects them to be technically strong and in terms of architecture to be decent. Interviewer also expects them to have people management skills.√ Project Manager are expec...
 
Dedicated catch Statements in C Sharp
2008-06-06 07:29:00
You can create dedicated catch statements that handle only some exceptions and not others, based on the type of exception thrown. The following illustrates how to specify which exception you'd like to handle.Example . Three dedicated catch statements: using System;namespace ExceptionHandling{ class Tester { public void Run() { try { double a = 5; double b = 0; Console.WriteLine("Dividing {0} by {1}...",a,b); Console.WriteLine ("{0} / {1} = {2}", a, b, DoDivide(a,b)); } // most derived exception type first catch (System.DivideByZeroException) { Console.WriteLine( "DivideByZeroException caught!"); } catch (System.Arithme...
 
Working of Call Stack in C Sharp
2008-06-05 03:32:00
When the exception is thrown, execution halts immediately and is handed to the catch block. It never returns to the original code path. It never gets to the line that prints the exit statement for the try block. The catch block handles the error, and then execution falls through to the code following the catch block. Because there is a catch block, the stack does not need to unwind. The exception is now handled, there are no more problems, and the program continues. This becomes a bit clearer if you move the try/catch blocks up to Func1(), as shows. Unwinding the stack by one level using System;namespace ExceptionHandling{ class Tester { static void Main() { Console.WriteLine("Enter Main..."); Tester t = new Tester(); t.Run(); Console.Writ...
 
Try and catch Statements in C Sharp
2008-06-04 08:40:00
To handle exceptions, take the following steps: Execute any code that you suspect might throw an exception (such as code that opens a file or allocates memory) within a try block. Catch any exceptions that are thrown in a catch block. A try block is created using the keyword try and is enclosed in braces. A catch block is created using the keyword catch and is also enclosed in braces.Example : Try and catch blocks using System;namespace ExceptionHandling{ class Tester { static void Main() { Console.WriteLine("Enter Main..."); Tester t = new Tester(); t.Run(); Console.WriteLine("Exit Main..."); } public void Run() { Console.WriteLine("Enter Run...");Console.WriteLine("Exit Run..."); } public...
 
Throw Statement in C Sharp
2008-06-01 06:46:00
To signal an abnormal condition in a C# program, throw an exception by using the throw keyword. The following line of code creates a new instance of System.Exception and then throws it: throw new System.Exception(); The following example illustrates what happens if you throw an exception and there is no try/catch block to catch and handle the exception. In this example, you'll throw an exception even though nothing has actually gone wrong, just to illustrate how an exception can bring your program to a halt.Example : Unhandled exception using System;namespace ExceptionHandling{ class Tester { static void Main() { Console.WriteLine("Enter Main..."); Tester t = new Tester(); t.Run(); Console.WriteLine("Exit Main..."); } publi...
 
EXCEPTIONS IN C SHARP INTRODUCTION
2008-05-31 04:06:00
All exceptions are either of type System.Exception or of types derived from System.Exception. The CLR System namespace includes a number of exception types that can be used by your program. These exception types include ArgumentNullException, InvalidCastException, and OverflowException, as well as many others. You can guess their use based on their name. For example, ArgumentNull exception is thrown when an argument to a method is null when that is not an expected (or acceptable) value.When your program encounters an exceptional circumstance, such as running out of memory, it throws (or raises) an exception. Exceptions must be handled before the program can continue. The search for an exception handler can unwind the stack. This means that if the currently running function does n...
 
The Regex Class in C Sharp
2008-05-30 03:44:00
The .NET Framework provides an object-oriented approach to regular expression pattern matching and replacement. The Framework Class Library namespace System.Text.RegularExpressions is the home to all the .NET Framework objects associated with regular expressions. The central class for regular expression support is Regex, which provides methods and properties for working with regular expressions, the most important of which are shown. Method or property Explanation Regex constructor Overloaded; creates an instance of Regex Options Property that returns the options passed in to the constructor IsMatch() Method that indicates whether a match is found in the input string Match Searches an input string and returns a match for a regular expression Matches Searches...
 
Manipulation and Regular Expressions of Strings
2008-05-29 07:20:00
The String class provides a host of methods for comparing, searching, and manipulating strings. Method or property Explanation Chars Property that returns the string indexer Compare() Overloaded public static method that compares two strings Copy() Public static method that creates a new string by copying another Equals() Overloaded public static and instance method that determines if two strings have the same value Format() Overloaded public static method that formats a string using a format specification Length Property that returns the number of characters in the instance PadLeft() Right-aligns the characters in the string, padding to the left with spaces or a specified character PadRight() Left-aligns the characters in the string, padding to t...
 
Strings Creation in C Sharp
2008-05-28 09:37:00
C# treats strings as if they were built-in types. C# strings are flexible, powerful, and easy to use. In .NET, each string object is an immutable sequence of Unicode characters. In other words, methods that appear to change the string actually return a modified copy; the original string remains intact. The declaration of the System.String class is: public sealed class String : IComparable, ICloneablee, IConvertible, IEnumerable This declaration reveals that the class is sealed, meaning that it is not possible to derive from the String class. The class also implements four system interfaces — IComparable, ICloneable, IConvertible, and IEnumerable — which dictate functionality that System.String shares with other classes in the .NET Framework.The IComparable interface is imple...
 
Collection Interfaces and c sharp
2008-05-27 06:26:00
Every collection has certain shared characteristics, which are captured by the collection interfaces. The .NET Framework provides standard interfaces for enumerating, comparing, and creating collections.By implementing the collection interfaces, your custom class provides the same semantics as the collection classes available through the .NET Framework. IEnumerable Enumerates through a collection using a foreach statement IEnumerator Iterates over a collection and supports the foreach loop ICollection Implemented by all collections IComparer Compares two objects; used for sorting IList Used by collections that can be indexed IDictionary For key/value-based collections such as Hashtable and SortedList IDictionaryEnum...
 
Multidimensional Arrays and c sharp
2008-05-26 10:43:00
You can think of arrays as long rows of slots into which values can be placed. Once you have a picture of a row of slots, imagine five rows, one on top of another. This is the classic two-dimensional array of rows and columns. The rows run across the array and the columns run up and down the array.A third dimension is possible but somewhat harder to picture. Imagine making your arrays three-dimensional, with new rows stacked atop the old two-dimensional array. OK, now imagine four dimensions. Now imagine ten. Those of you who are not string-theory physicists have probably given up, as have I. Multidimensional arrays are useful, however, even if you can't quite picture what they would look like. You might, for example, use a four-dimensional array to track movement in three dimensi...
 
Arrays and c sharp
2008-05-26 03:43:00
An array is an indexed collection of objects, all of the same type (e.g., all ints, all strings, etc.). C# provides a native syntax for the declaration of Array objects: int[] myArray; When you declare an array, you actually create an instance of the Array class in the System namespace (System.Array). Arrays in C# thus provide you with the best of both worlds: easy-to-use syntax built into the language, underpinned with an actual class definition so that instances of an array have access to the methods and properties of System.Array. The System.Array class is discussed in detail later in this chapter. Declaring Arrays You declare a C# array with the following syntax: type[] array-name; The square brackets ([]) tell the C# compiler that you are declaring an array. (Note that the ...
 
Explicit Interface Implementation in c sharp
2008-05-26 03:38:00
In the implementation shown so far, the implementing class (Document) creates a member method with the same signature and return type as the method detailed in the interface. It is not necessary to explicitly state that this is an implementation of an interface; this is understood by the compiler implicitly. What happens, however, if the class implements two interfaces, each of which has a method with the same signature? This might happen if the class implements interfaces defined by two different organizations or even two different programmers. The next example creates two interfaces: IStorable and ITalk. The latter implements a Read() method that reads a book aloud. Unfortunately, this conflicts with the R...
 
Overriding Interface Implementations in c sharp
2008-05-24 23:05:00
An implementing class is free to mark any or all of the methods from the interface as virtual. Derived classes can then override or provide new implementations, just as they might with any other virtual instance method. For example, a Document class might implement the IStorable interface and mark its Read() and Write() methods as virtual. The developer might later derive new types from Document, such as a Note type. While the Document class implements Read() and Write to save to a File, the Note class might implement Read() and Write() to read from and write to a database.Document implements the IStorable-required Read() method as a virtual method, and Note overrides that implementation.To illustrate the implications of marking an implementing ...
 
Combining Interfaces in c sharp
2008-05-23 06:58:00
You can also create new interfaces by combining existing interfaces and optionally adding new methods or properties. For example, you might decide to combine the definitions of IStorable and ICompressible into a new interface called IStorableCompressible. This interface would combine the methods of each of the other two interfaces, but would also add a new method, LogOriginalSize(), to store the original size of the pre-compressed item: interface IStorableCompressible : IStorable, ILoggedCompressible{ void LogOriginalSize();} Having created this interface, you can now modify Document to implement IStorableCompressible: public class Document : IStorableCompressible You now can cast the Document object to any of the four interfaces you've created so far: IStorable isDoc = doc as IS...
 
Extending Interfaces in c sharp
2008-05-18 07:09:00
It is possible to extend an existing interface to add new methods or members, or to modify how existing members work.For example, you might extend ICompressible with a new interface, ILoggedCompressible, which extends the original interface with methods to keep track of the bytes saved. One such method might be called LogSavedBytes().The following code creates a new interface named ILoggedCompressible that is identical to ICompressible except that it adds the method LogSavedBytes. interface ILoggedCompressible : ICompressible{ void LogSavedBytes();} Classes are now free to implement either ICompressible or ILoggedCompressible, depending on whether they need the additional functionality.If a class does implement ILoggedCompressible, it must implement all the methods of both ILog...
 
Casting to an Interface in c sharp
2008-05-14 05:47:00
You can access the members (i.e., methods and properties) of an interface through the object of any class that implements the interface. Thus, you can access the methods and properties of IStorable, through the Document object: Document doc = new Document("Test Document");doc.status = -1;doc.Read();When you cast you say to the compiler, "trust me, I know this object is really of this type." In this case you are saying "trust me, I know this document really implements IStorable, so you can treat it as an IStorable." Casting is safe to do because the Document object implements IStorable and thus is safely treated as an IStorable object. You cast by placing the type you are casting to in parentheses. The followin...
 
Implementing More Than One Interface
2008-05-13 06:40:00
Classes can derive from only one class (and if you don't explicitly derive from a class, then you implicitly derive from Object). Classes can implement any number of interfaces. When you design your class, you can choose not to implement any interfaces, you can implement a single interface, or you can implement two or more interfaces.For example, in addition to IStorable, you might have a second interface, ICompressible, for files that can be compressed to save disk space. If your Document class can be stored and compressed, you might choose to have Document implement both the IStorable and ICompressible interfaces. IStorable and ICompressible, implemented by Document using System;namespace InterfaceDemo{ interface IStorable { void Read...
 
Implementing Interfaces in microsoft dotnet
2008-05-03 11:33:00
The syntax for defining an interface is very similar to the syntax for defining a class or a struct: [attributes ] [access-modifier ] interface interface-name [: base-list ] {interface-body } Access modifiers (public, private, etc.) work just as they do with classes. It is common (but not required) to begin the name of your interface with a capital I The body of the interface is defined within braces, just as the body of a class would be. Suppose you want to create an interface to define the contract for data being stored to a database or file. Your interface will define the methods and properties a class will need to implement in order to be stored to a database or file. You decide to call this interface IStorable. In this interface, you might specify two methods, Read() a...
 
Sealed Classes in microsoft dot net
2008-05-03 11:28:00
The opposite side of the design coin from abstract is sealed. In contrast to an abstract class, which is intended to be derived from and to provide a template for its subclasses to follow, a sealed class does not allow classes to derive from it at all. The sealed keyword placed before the class declaration precludes derivation. Classes are most often marked sealed to prevent accidental inheritance. The Root of All Classes: Object All C# classes, of any type, are treated as if they ultimately derive from a single class: Object. Object is the base class for all other classes. A base class is the immediate "parent" of a derived class. A derived class can be the base to further derived classes, creating an inheritance "tree" or hierarchy. A root cla...
 
Abstract Classes in microsoft dot net
2008-05-03 11:25:00
Each type of Window has a different shape and appearance. Drop-down listboxes look very different from buttons. Clearly, every subclass of Window should implement its own DrawWindow() method — but so far, nothing in the Window class enforces that they must do so. To require subclasses to implement a method of their base, you need to designate that method as abstract. An abstract method has no implementation. It creates a method name and signature that must be implemented in all derived classes. Furthermore, making at least one method of any class abstract has the side effect of making the class abstract. Abstract classes establish a base for derived classes, but it is not legal to instantiate an object of an abstract class. Once you declare a method to be abstract, you prohi...
 
Polymorphism microsoft dot net
2008-05-03 08:57:00
There are two powerful aspects to inheritance. One is code reuse. When you create a ListBox class, you're able to reuse some of the logic in the base (Window) class. What is arguably more powerful, however, is the second aspect of inheritance: polymorphism. Poly means many and morph means form. Thus, polymorphism refers to being able to use many forms of a type without regard to the details. When the phone company sends your phone a ring signal, it does not know what type of phone is on the other end of the line. You might have an old-fashioned Western Electric phone that energizes a motor to ring a bell, or you might have an electronic phone that plays digital music. As far as the phone company is concerned, it knows only about the "base type" phone and expects that any "instan...
 
Inheritance in microsoft dot net
2008-05-03 08:54:00
In C#, the specialization relationship is implemented using a principle called inheritance. This is not the only way to implement specialization, but it is the most common and most natural way to implement this relationship. Saying that ListBox inherits from (or derives from) Window indicates that it specializes Window. Window is referred to as the base class, and ListBox is referred to as the derived class. That is, ListBox derives its characteristics and behaviors from Window and then specializes to its own particular needs. Implementing Inheritance In C#, you create a derived class by adding a colon after the name of the derived class, followed by the name of the base class: public class ListBox : Window This code declares a new class, Li...
 
Specialization and Generalization in microsoft dotnet
2008-05-03 08:51:00
Classes and their instances (objects) do not exist in a vacuum but rather in a network of interdependencies and relationships, just as we, as social animals, live in a world of relationships and categories. One of the most important relationships among objects in the real world is specialization, which can be described as an is-a relationship. When we say that a Dog is a mammal, we mean that the Dog is a specialized kind of Mammal. It has all the characteristics of any Mammal (it bears live young, nurses with milk, has hair), but it specializes these characteristics to the familiar characteristics of canine domesticus. A Cat is also a mammal. As such we expect it to share certain characteristics with the Dog that are generalized in Mammal, but to differ in those characteristics ...
 
Debugging in visual studio .net
2008-05-03 02:00:00
The debugger is your friend. There is simply no more powerful tool than a debugger for learning C# and for writing quality C# programs. The debugger helps you understand what is really going on when your program is running. It is the x-ray of software development, allowing you to see inside programs and diagnose potential problems. Without a debugger you are guessing; with a debugger you are seeing. It is as simple as that. Whatever time you invest in learning to use your debugger is time well spent. The debugger is also a powerful tool for understanding code written by others. By putting someone else's code into the debugger and stepping through it, you can see exactly how the methods work and what data they manipulate. The VS.NET debugger provides a number of windows for wa...
 
Inside Methods in visual studio .net
2008-05-03 01:55:00
Often you'll want to have more than one method with the same name. The most common example of this is to have more than one constructor with the same name, which allows you to create the object with different parameters. For example, if you were creating a Time object, you might have circumstances where you want to create the Time object by passing in the date, hours, minutes, and seconds. Other times, you might want to create a Time object by passing in an existing Time object. Still other times, you might want to pass in just a date, without hours and minutes. Overloading the constructor allows you to provide these various options.It would be convenient also to allow the client to create a new Time object by passing in year, month, date, hour, minute, and second values. Some cl...
 
Destroying Objects in c sharp
2008-05-02 09:06:00
Unlike many other programming languages (C, C++, Pascal, etc.), C# provides garbage collection. Your objects are automatically destroyed when you are done with them. You do not need to worry about cleaning up after your objects unless you use unmanaged resources. An unmanaged resource is an operating-system feature outside of the .NET Framework, such as a file handle or a database connection. If you do control an unmanaged resource, you need to explicitly free that resource when you are done with it. Implicit control over this resource is provided with a destructor, which is called by the garbage collector when your object is destroyed. Note that this material is fairly advanced; it is included here for completeness. You declare a C# destructor with a tilde as follows:~MyClass()...
 
 
 
 
eXTReMe Tracker