within a class:
main must be a static method
In a static class we cant able to declare non static methods
In a non static class we can able to declare static methods
From a static method we cant able to call non static method. if need use an object for that class
From a non static method we can able to call static method
Two Non static classes:
From a non static method we cant call a non static method. need to create object for the class
From a non static method we cant call a static method. only able by using class name and dot(.)
From a static method we cant call a static method. only able by using class name and dot(.)
From a static method we cant call a non static method. need to create object for the class
Two static classes:
Cant able to create object for classs
From a static method we can call a static method. only able by using class name and dot(.)
Cant able to override non virtual or static methods
Cant able to create instance for interface or abstact class
you can use a cast to create an instance for an interface in C#
Cant able to inherit abstract method but able abstract class
Cant able to derive a sealed class
interface has only method declaration bcoz all method in interface are public and abstaract, Abstract method does not have any body
Abstract class have both abstract and nonabstract methodes.so those abstract methods only have declaration and non ablstract method have body also.
All abstract methods must implemented while using the abstract class or interface
Non abstract class doesnot contain abstract method
Boxing:
Value type to object type-implicit-compiler will do
unboxing
object type to value type-explicit-using type cast
We can override the base class method from deri class, only if the the base class method is virtual or abstract
Unlike base classes, interfaces don't implement any of their members by providing the actual code for properties, methods, and so on. Interfaces are just specifications for those members, and if your class implements an interface, it must provide code for all the members of that interface.
Delegates let you pass methods as parameters. They provide you with another form of polymorphism, because you can assign methods to delegates at runtime, leaving the rest of your code unchanged but calling the methods you specify at runtime.
No special impact for the delegate on static methods
BufferedStream object, which will use its own internal buffer to maximize performance
we've simply read data from a file and waited for the read operation to finish before doing anything. As we start working with network I/O, where things can be a lot slower, it won't be as easy to wait for reading and writing operations to complete. For that reason, the .NET Framework supports asynchronous I/O through the BeginRead and BeginWrite methods of the Stream class. You can call BeginRead to read a bufferfull of data, or BeginWrite to write a bufferfull of data, and then go on to do other work
C# enables you to save an entire object, including all its data (called an object-graph) through a process called serialization. Serialization lets you write entire objects out to disk and read them back in later. Objects that pass between assembly boundaries (through a process called marshalling) are also serialized.
The common language runtime does not support static variables in methods.
You don't have to serialize all the members of an object; for example, if you have a huge array filled with sequential numbers that's easy to re-create, there's no benefit to taking up a great deal of disk space by storing that array to memory. To mark members that you don't want serialized, you use the [NonSerialized] attribute.
if you didn't want to serialize the data array in ch05_13.cs, you could mark it with [NonSerialized]; note that when you use this attribute, you should implement the IDeserializationCallback interface,
Isolated storage saves data for your application that you might have stored in the Registry before.To store data in isolated storage, you use the IsolatedStorageFileStream class;(used to store configuration data)
You can also create arrays of arrays, called jagged arrays because they need not be rectangular.Here's the syntax you use to create an array of arrays.
Answer: Web services are programmable business logic components that provide access to functionality through the Internet. Standard protocols like HTTP can be used to access them. Web services are based on the Simple Object Access Protocol (SOAP), which is an application of XML. Web services are given the .asmx extension..
out and ref are reference type diff is ref must initialize.but out does not must be initialized
Eval is used for unidirectional (readonly) data binding, while Bind is for bi-directional (editable) databinding.
The Eval method is a static (read-only) method that takes the value of a data field and returns it as a string. The Bind method supports read/write functionality with the ability to retrieve the values of data-bound controls and submit any changes made back to the database.
DataSet is just a collection of DataTable objects
DataSet is an in-memory representation of data, containing one or more DataTables. A DataTable is an in-memory representation of data, typically retrieved from a database or XML source.
A DataView is a view onto an in-memory representation of data held in a DataTable.
main must be a static method
In a static class we cant able to declare non static methods
In a non static class we can able to declare static methods
From a static method we cant able to call non static method. if need use an object for that class
From a non static method we can able to call static method
Two Non static classes:
From a non static method we cant call a non static method. need to create object for the class
From a non static method we cant call a static method. only able by using class name and dot(.)
From a static method we cant call a static method. only able by using class name and dot(.)
From a static method we cant call a non static method. need to create object for the class
Two static classes:
Cant able to create object for classs
From a static method we can call a static method. only able by using class name and dot(.)
Cant able to override non virtual or static methods
Cant able to create instance for interface or abstact class
you can use a cast to create an instance for an interface in C#
Cant able to inherit abstract method but able abstract class
Cant able to derive a sealed class
interface has only method declaration bcoz all method in interface are public and abstaract, Abstract method does not have any body
Abstract class have both abstract and nonabstract methodes.so those abstract methods only have declaration and non ablstract method have body also.
All abstract methods must implemented while using the abstract class or interface
Non abstract class doesnot contain abstract method
Boxing:
Value type to object type-implicit-compiler will do
unboxing
object type to value type-explicit-using type cast
We can override the base class method from deri class, only if the the base class method is virtual or abstract
Unlike base classes, interfaces don't implement any of their members by providing the actual code for properties, methods, and so on. Interfaces are just specifications for those members, and if your class implements an interface, it must provide code for all the members of that interface.
Delegates let you pass methods as parameters. They provide you with another form of polymorphism, because you can assign methods to delegates at runtime, leaving the rest of your code unchanged but calling the methods you specify at runtime.
No special impact for the delegate on static methods
BufferedStream object, which will use its own internal buffer to maximize performance
we've simply read data from a file and waited for the read operation to finish before doing anything. As we start working with network I/O, where things can be a lot slower, it won't be as easy to wait for reading and writing operations to complete. For that reason, the .NET Framework supports asynchronous I/O through the BeginRead and BeginWrite methods of the Stream class. You can call BeginRead to read a bufferfull of data, or BeginWrite to write a bufferfull of data, and then go on to do other work
C# enables you to save an entire object, including all its data (called an object-graph) through a process called serialization. Serialization lets you write entire objects out to disk and read them back in later. Objects that pass between assembly boundaries (through a process called marshalling) are also serialized.
The common language runtime does not support static variables in methods.
You don't have to serialize all the members of an object; for example, if you have a huge array filled with sequential numbers that's easy to re-create, there's no benefit to taking up a great deal of disk space by storing that array to memory. To mark members that you don't want serialized, you use the [NonSerialized] attribute.
if you didn't want to serialize the data array in ch05_13.cs, you could mark it with [NonSerialized]; note that when you use this attribute, you should implement the IDeserializationCallback interface,
Isolated storage saves data for your application that you might have stored in the Registry before.To store data in isolated storage, you use the IsolatedStorageFileStream class;(used to store configuration data)
You can also create arrays of arrays, called jagged arrays because they need not be rectangular.Here's the syntax you use to create an array of arrays.
Answer: Web services are programmable business logic components that provide access to functionality through the Internet. Standard protocols like HTTP can be used to access them. Web services are based on the Simple Object Access Protocol (SOAP), which is an application of XML. Web services are given the .asmx extension..
out and ref are reference type diff is ref must initialize.but out does not must be initialized
Eval is used for unidirectional (readonly) data binding, while Bind is for bi-directional (editable) databinding.
The Eval method is a static (read-only) method that takes the value of a data field and returns it as a string. The Bind method supports read/write functionality with the ability to retrieve the values of data-bound controls and submit any changes made back to the database.
DataSet is just a collection of DataTable objects
DataSet is an in-memory representation of data, containing one or more DataTables. A DataTable is an in-memory representation of data, typically retrieved from a database or XML source.
A DataView is a view onto an in-memory representation of data held in a DataTable.
0 comments:
Post a Comment