namespaces & assemblies
The
import
statement enables access to a namespace in an external library or within the current script. The syntax is very simple:import namespaceName;
where namespaceName
is the name of the required namespace. There is always the question as
to where the computer should search for the given namespace. A
namespace is a collection of classes that typically offer related
features or functions. An assembly, on the other hand, is a physical
file, deployed during installation of the .NET framework, or other
applications. File extensions.dll
or.exe
are a clear indication of assemblies. Usually, your namespaces will be implemented in.dll
files. What's the relationship between the.dll
file name and the namespace name? Generally speaking, none. A single namespace can be distributed among several.dll
files. Also, a single.dll
file can include multiple namespaces. In practice, though, the name of the.dll
is usually the name of the namespace, and thejsc.exe
compiler does support this practice with the/autoref
compilation switch.
Mitesh Mehta
Tuesday, July 27, 2004
namespaces & assemblies
Thursday, July 22, 2004
Data Structures in C#
Data Structures in C#
This six-part series that focuses on important data structures and their
use in application development. Also examines both built-in data structures
present in the .NET Framework, as well as essential data structures we'll have
to build ourselves.Part 1: An Introduction
to Data StructuresFocuses on defining what data
structures are, how the efficiency of data structures is analyzed, and why this
analysis is important.Part 2: The Queue,
Stack, and HashtableExamines three of the most
commonly studied data structures: the Queue, the Stack, and the
Hashtable.
Looks at a common data
structure that is not included in the .NET Framework Base Class Library:
binary trees.Part 4: Building a
Better Binary Search TreeExamination of AVL trees and
red-black trees, which are two different self-balancing, binary search tree data
structures, skip list data structure, an ingenious data structure that turns a
linked list into a data structure that offers the same running time as the more
complex self-balancing tree data structures
All about graphs, one of the
most versatile data structures.Part 6: Efficiently
Representing SetsData structures for implementing general and disjoint sets. A set is an
unordered collection of unique items that can be enumerated and compared to
other sets in a variety of ways.
Some Questions On .Net
Some Questions On .Net
7.How to get updated data if datasource changes after filling dataset from datasource?First
of all, a dataset should be used only when the data is not expected to
change very often. To get data that has been changed in the datasource
itself, means simply re-querying the datasource and re-filling the
dataset.
Shared & Protected methods
Shared methods
You
can have as many shared (static, in C#) methods as you want. But the
constraint here is that these methods will not be available from the
class's instance objects. Also, with shared methods the benefits of
object "construction" are not available, since shared methods can only
be called on the class directly rather than on the instances. Also,
shared methods do not have access to the class's non-shared or
non-static member variables.
Protected
members are different from friend members...Consider any class "A".
Friend methods are those that belong to a different class but have
access to A's members. Protected members are those members that can be
accessed by a derived class's methods - this is different from private
members which can only be accessed by the methods of A.Consider the class "A" mentioned above:
Member type Access level Private Can be accessed only by methods of A Protected Can be accessed by methods of A as well as methods of any class derived from A
For
friend members, first of all, only "Methods" or "Functions" can act as
"Friends" of a class and a method belonging class B must be declared as
a friend method in class A so that B.FriendMethod() can access member
variables of class A.
Saturday, July 17, 2004
Presentations from TechED (US)
Presentations from TechED (US)
View or download the .NET Framework-related presentations
from TechEd 2004 (US)
using below linkhttp://msdn.microsoft.com/netframework/support/training/teched2004/
The following some of presentations that I liked,1) Exploring What's New in the CLR 2.0
2) Visual C# Best Practices
3)
Visual C# 2005: Language Enhancements
4) Visual Studio: Deploying NET
Applications with Ease
5) .NET and J2EE Strategies for InteroperabilityThere are more inside.. worth a reference, download ASAP!!
Regards,
Mitesh Mehta
Microsoft Certified Professionalmiteshvmehta@gmail.com
Beta 1 .NET FrameWork 2.0 available for Public Download
Beta 1 .NET FrameWork 2.0 available for Public Download
The Beta 1 .NET Framework 2.0 SDK and redistributables are available for
download.You can find them here:
Regards,
Mitesh V. Mehta
Microsoft Certified Professionalmiteshvmehta@gmail.com
New ADO.NET 2.0
New ADO.NET 2.0
With the new release of
Visual Studio .NET 2005 Beta 1 and the .NET Framework 2.0 Beta Microsoft has
included a lot of nice enhancements to ADO.NET 2.0. By either using the DAAB or
writing it your self, you could get generic provider factories. Microsoft has
now included this in ADO.NET 2.0 along with a lot of other nice enhancements.
For those using SQL Server and wanting to provide a list of servers to your
users, we would have to PInvoke SQL DMO. Now there is a new base class called
DbEnumerator. The SqlClient support for this class will return a list of SQL
servers. There is a ton of features that you can read more about at the
following link...http://msdn.microsoft.com/data/default.aspx?pull=/library/en-us/dnvs05/html/ado2featurematrix.asp
Regards,
Mitesh Mehta
Microsoft
Certified Professional
Refactoring in Whidbey
Refactoring in Whidbey
Code refactoring means restructuring your code so that the original
intention of the code is preserved.Example of code refactoring is extracting a block of code and placing it
into a function for more efficient code reuse. In Visual Studio .NET 2005
(codenamed Whidbey), a code refactoring engine is built in.Read more here..
MSDN has also posted a good article on Refactoring for C# Code Using
Visual Studio 2005 that introduces the concept of refactoring and covers many of
the techniques that are supported in the new IDE.
Regards,
Mitesh Mehta
Microsoft Certified Professionalmiteshvmehta@gmail.com
Friday, July 16, 2004
Boxing and Unboxing
Boxing and Unboxing
It's
better to say that boxing (and unboxing) is a specialised form of
casting or type-casting. In .NET, every class derives from the "object"
class. Since the "object" class is the base class of all objects, any
object can be cast to the type "object" and then reconverted to the
specific type. The conversion from specific type to "object" is called
boxing and the reverse is called unboxing. Unlike traditional casting,
any object or datatype can be boxed and unboxed. In traditional
casting, there are certain limitations. For example, string type cannot
be cast into, say, int type. But any object or variable can
be cast to "object". So in simple terms, boxing is casting from
specialised type to type "object" and unboxing is the reverse.Regards,
Mitesh Mehta
Microsoft Certified Professionalmiteshvmehta@gmail.com
Monday, July 12, 2004
Add/Remove Programs feature in Control Panel
To utilize the Add/Remove Programs feature in Control Panel, you must add a key to the Registry under HKEY_LOCAL_MACHINES\Software\Microsoft\Windows\CurrentVersion\Uninstall\Uniq ueName where UniqueName will be any Unique name that you can use for your program identification Note: Goto Start->Run - Type "Regedit" and browse to the location to see for yourself... Mitesh Mehta M.C.P. (.Net) |
Some Questions On .Net
Some Questions On .Net
1.How many classes can a single dll can have?A single DLL (.net assembly) can have many classes / a single class.2.how to create permenant cookie?In Classic Asp, we used to set the "Expires" property to "Never" to the cookie object, I'm sure microsoft has kept it that way!.3.what is difference between response.write() and response.output.write()?Response.Output.Write() -- writes the output in the format specified, where as Response.Write() does not.4.how to kill a session explicitly?you mean programatically?,Session.Abandon()5.how to make a wrap up call to web service?What
do you mean by wrap up call, webservice exposes some methods over the
web- that's why it is called web method, once added web-reference to a
webservice to a dotnet web/windows application, a proxy is created for
you(client) and you can make webmethod call , as if the object is
available locally.If we're talking about non-.net
client(like Java), then soap / xml is used to post the request to the
.Net Web method(s). in order to execute them and get values .6.what os bubbled event?Pass!.7.How to get updated data if datasource changes after filling dataset from datasource?take care,
New features in .NET Framework 2.0
New features in .NET Framework 2.0
The .NET Framework 2.0 introduces enhancements across the .NET Framework.
Windows client application development will be simplified through new controls
and designer features, while the introduction of "ClickOnce" technology will
dramatically ease Windows client application deployment. ASP.NET 2.0 introduces
a collection of new features that refine Web application development and
radically reduce coding effort. Other enhancements include more productive
ADO.NET data access, support for the latest Web services standards, and expanded
functionality for device-based development.
Common Language Runtime 2.0Generics: Generics are classes and methods that work
uniformly on values of different types and can greatly improve developer
productivity by boosting code reuse.Edit and Continue: The feature that made Visual Basic
“RAD” is now in the core CLR, enabling developers to halt program execution,
change a line of code, and continue running it without a full
recompilation.Performance and Load Time: The CLR now loads more quickly
and takes up less memory footprint.Windows Forms 2.0Application Deployment: Windows Forms 2.0 introduces
“ClickOnce,” which makes it simple for developers to package and deploy
applications and simplifies the inclusion of pre-requisites in the installation
package. ClickOnce further provides a simple way for administrators and users to
deploy and update applications.Visually Stunning Presentation: Windows Forms 2.0 brings
together the capability to build applications that look like Microsoft Office
and increases flexibility and control over how you can position controls on the
forms. It includes a new grid control, a Sound Player control, a Web Browser
control and an Active Document Host control. Beyond that, in order to make your
application look more like Microsoft Windows or Office, we have made Windows
Forms controls render with visual styles by default, and we have created a new
menu, toolbar, and status bar family of controls called ToolStrips.
ASP.NET 2.0Productivity and Customizability: ASP.NET 2.0 includes
support for membership (user name/password credential storage) and role
management services. The personalization service enables quick storage/retrieval
of user settings and preferences, facilitating rich customization with minimal
code. Master Pages now enable flexible page UI inheritance across sites.
Augmenting all these infrastructure features are more than 45 new server
controls in ASP.NET 2.0 that enable powerful declarative support for data
access, login security, wizard navigation, image generation, menus, treeviews,
portals, and more.
UI Adaptability: All standard ASP.NET 2.0 controls are
now built with a rich UI adapter extensibility architecture that enables
customization of output for different browsers and devices. All built-in ASP.NET
controls with the <asp:> prefix are now mobile enabled in Whidbey, which
allows developers to automatically target more than 300+ unique devices that
support a variety of different markup standards (WAP/WML, XHTML Mobile, cHTML,
etc).Administration and Management: ASP.NET 2.0 includes
configuration management APIs, enabling developers to create, read, and update
Web.config and machine.config configuration files and an admin tool that plugs
into the existing IIS Administration MMC, enabling an administrator to
graphically read or change any setting within our XML configuration files. It
also includes a new application deployment utility that will enable both
developers and administrators to precompile a dynamic ASP.NET application prior
to deployment protecting your source code. Finally, ASP.NET 2.0 provides
health-monitoring and tracing support to enable administrators to be
automatically notified when an application on a server starts to experience
problems.Speed and Performance: ASP.NET 2.0 is 64-bit enabled so it
can take advantage of the full memory address space of new 64-bit processors and
servers. ASP.NET 2.0 also includes automatic database server cache invalidation
enabling developers to cache database-driven pages and partial page content and
have ASP.NET automatically invalidate these cache entries and refresh the
content whenever the back-end database changes.Regards,
Varad
Microsoft Solutions Group
.NET Framework 1.0 SP3 and 1.1 SP1 Tech Preview Available for Public Download
.NET Framework 1.0 SP3 and 1.1 SP1 Tech Preview Available for Public Download
.NET Framework 1.0 SP3 and 1.1 SP1 Tech Preview Available for Public Download
Microsoft had made technology
preview versions of the .NET Framework 1.0 SP3 and .NET Framework 1.1 SP1
available for developers to download so they can test their .NET
Framework-based applications with these service packs applied. Though these are
unsupported technology previews, we would like to ask your help in ensuring the
quality of the service packs by downloading them, testing your existing
applications on them, and giving us feedback.
These two service packs
address issues with the .NET Framework 1.0 and 1.1 including:
<![if !supportLists]>·
<![endif]>All
customer issues addressed with hotfixes
<![if !supportLists]>·
<![endif]>Improved
importing of WSDL
<![if !supportLists]>·
<![endif]>Data
Execution prevention<o:p></o:p>
<![if !supportLists]>·
<![endif]>Buffer
overrun protection
Customers can
download
the technology previews from <st1:place
w:st="on"><st1:PlaceName
w:st="on">Microsoft.com</st1:PlaceName> <st1:PlaceName
w:st="on">Download</st1:PlaceName> <st1:PlaceType
w:st="on">Center</st1:PlaceType></st1:place>
at: <o:p></o:p>
.NET
Framework 1.0 Service Pack 3 Tech Preview: http://www.microsoft.com/downloads/details.aspx?FamilyId=CF52CA95-F2CC-459F-87EE-C17D16E22F08&displaylang=en
.NET
Framework 1.1 Service Pack 1 Tech Preview: http://www.microsoft.com/downloads/details.aspx?FamilyId=12721880-CB9F-4481-9610-987DE96532E7&displaylang=en
.NET
Framework 1.1 Service Pack 1 Tech Preview for Windows Server 2003: http://www.microsoft.com/downloads/details.aspx?FamilyId=DA1C20AD-35AE-4CEA-8451-730FCD603383&displaylang=en
If you have feedback,
please send it to us at http://communities.microsoft.com/newsgroups/default.asp?icp=techpreview&slcid=us;
Thanks very much for your
time,
MS Press - Ebook of 70-310/70-320
MS Press - Ebook of 70-310/70-320
http://www.intersoftlb.com/ebook.aspx - DUMPS ARE AVAILABLE
HelpProvider Class
HelpProvider Class
HelpProvider Class in Windows form has a method SetHelpString()...
This method will associate a string that you provide with the control
specified... This help will be shown when the user presses F1 while the
control has focus...
Example
Private objhelpProvider As System.Windows.Forms.HelpProvider
Me.objhelpProvider.SetHelpString(Me.txtZipCode, "Just enter the first 5
digits for Zip code, this applies to US only...")
Me.objhelpProvider.SetShowHelp(Me.txtZipCode, True)
Mitesh Mehta
Application Domains Basics
Application Domains Basics
Inter process communication is always painful... The memory pointers in one
process many a times do not make a lot of sense in the other process... To
tackle this problem and many others; Application Domains are introduced in
.Net... There can be more than one Application Domain running under the same
process... Application Domain provides nearly equivalent level of isolation
as would a separate process and at the same time saves the hits of
cross-process communications... By having high isolation you can prevent
failure of one application to affect other application...
Note: There is lot more to application domains and its a very interesting
topic, do give it some time of yours it will be worthwhile..
Mitesh Mehta