answersLogoWhite

0

📱

.NET Programming

.NET Programming involves the use of the .NET Framework, a software framework for Microsoft Windows operating systems. The framework supports several programming languages. The .NET library is available to all the programming languages that .NET supports.

607 Questions

What was the difference between java and net?

Net survives because of java. Net is made up of java.

Internet is a huge network which can be accessed by various users throughout the world. They can use different platforms(or operating systems) which may cause problems like a web page designed for windows may not work with Linux.

Therefore to get rid of this problem java is used to design the internet which is

platform independent.

That is why, net and java are almost same but none is better although net has

got some additional features like flash,etc. with time.

What is the importance of recursion in computer programming?

Recursion is important because many algorithms are naturally recursive, particularly those that involve a divide-and-conquer technique. That is, we divide a complex problem into smaller instances of the same problem. Each division divides and reduces the problem further until the divisions are small enough to be resolved. We then aggregate those individual solutions to solve the original problem.

As a simple example, factorials can be calculated such that f(n) = n * f(n-1) for all n>1 where f(1) and f(0) are both 1. We can implement this function recursively as follows:

unsigned f(unsigned n) {

return n<2 ? 1 : n * f(n-1);

}

While the function itself is naturally recursive, that doesn't mean we must use a recursive solution. In this case, an iterative solution would actually be more efficient:

unsigned f(unsigned n) {

unsigned a = 1;

while (1<n) a *= n--;

return a;

}

However, in languages that allow compile-time computation (such as C++), recursive functions can be advantageous:

constexpr unsigned f(unsigned n) {

return n<2 ? 1 : n * f(n-1);

}

With this function, a good compiler will convert f(6) to the literal constant 720, completely eliminating the runtime overhead of invoking the function recursively. However, for values that cannot be computed at compile time due to excessive recursions, the runtime function will still be invoked, such that f(10) might be replaced with the constant expression 10 * f(9).

Languages that support template metaprogramming can provide the means to completely eliminate the runtime overhead associated with recursion:

template <unsigned N>

constexpr unsigned f () {

return N*f<N-1>();

}

template<>

constexpr unsigned f<1>() {

return 1;

}

template<>

constexpr unsigned f<0>() {

return 1;

}

Note that the terminating conditions are handled through specialisation rather than through recursion. At compile time, f<1>() invokes the first specialisation while f<0>() invokes the second. For all values N>1, the general function is invoked recursively at compile time.

constexpr unsigned x = f<10>();

Compile-time computation will effectively replace the above expression with:

constexpr unsigned x = 3628800;

Note that no code is generated for these template functions so we cannot invoke them at runtime, they are used purely for compile-time computation.

In languages that do not support template metaprogramming or constexpr, we can still make use of recursion, particularly where an iterative approach is too complex to implement efficiently. Divide-and-conquer algorithms are a typical example.

The Quicksort algorithm is a relatively simple recursive algorithm that can be implemented as follows:

void qsort (int a[], int lo, int hi) {

if (hi<=lo) return;

unsigned pivot = partition (a, lo, hi);

qsort (a, lo, pivot-1);

qsort (a, pivot+1, hi);

}

The partition() function does most of the actual work. Given the lower and upper bounds of the array it will select a pivot value and position this value such that all values to the left of it are less than it and all those to the right are not less than it. Once the array is partitioned, the index of the pivot value is returned. This value is used to determine the upper bound of the left sub-array (pivot-1) and the lower bound of the right sub-array (pivot+1).

What are the different types of data types used in c.net?

In C#, data types can be categorised as

  1. Value Types.
  2. Reference Types.

Value Types

Variables defined from Value Types store values. Copying one value type caribale tp another, doesn't affect the priginal vraible.

They can be further categorised into: -

1) structs: - They can be numeric (int, float, decimal), bool, user-defined structs.

2) Enumerations: - They consist of a set of named constants. By default the first enumerator has value=0.

Reference Types

These objects store references to the actual data. These can be categorised into: -

1) Classes: -- They encapsulate data and its functionality into a single entity called OBJECT.

2) Interfaces: - These are used to declare the signatures, blurprints of methods, delegates and events.

3) Delegates: - These contain the addresses/references to a method.

For more information refer to related links.

How do you find the square root of a number in C?

You write a function that evaluates the square root of its argument and returns the result to the caller.

You can also use the run-time library functions in math.h ...

double sqrt (double x);

double pow (double x, (double) 0.5);

Is it necessary to implement all the methods of abstract classes in derived class?

An Abstract class is a way to organize inheritance, sometimes it makes no since to implement every method in a class (i.e. a predator class), it may implement some to pass to its children but some methods cannot be implemented without knowing what the class will do (i.e. eat() in a Tiger class). Therefore, abstract classes are templates for future specific classes.

A disadvantage is that abstract classes cannot be instantiated, but most of the time it is logical not to create a object of an abstract class. heloooooo

C sharp dot net example programs for beginers?

C#.net ProgramsProgram # 1:This program takes three positive numbers from user. Compute and display the average of the two larger numbers.

using System;

using System.Collections.Generic;

using System.Text;

namespace Average_of_three_Nos

{

class Program

{

static void Main(string[] args)

{

string no1, no2, no3;

int n1, n2, n3;

int average;

Console.WriteLine("Enter First Number");

no1 = Console.ReadLine();

n1 = Int32.Parse(no1);

Console.WriteLine("Enter Second Number");

no2 = Console.ReadLine();

n2 = Int32.Parse(no2);

Console.WriteLine("Enter third Number");

no3 = Console.ReadLine();

n3 = Int32.Parse(no3);

average = (n1 + n2 + n3) / 3;

Console.WriteLine("Average of three Numbers : "+ average);

}

}

}

Program #2:This program will take two positive numbers as its input and then find GCD of them.

using System;

using System.Collections.Generic;

using System.Text;

namespace GCD

{

class Program

{

static void Main(string[] args)

{

Program obj = new Program();

string no1, no2;

int n1, n2;

Console.WriteLine("Enter First Number");

no1 = Console.ReadLine();

n1 = Int32.Parse(no1);

Console.WriteLine("Enter Second Number");

no2 = Console.ReadLine();

n2 = Int32.Parse(no2);

int g=obj.find_gcd(n1, n2);

Console.WriteLine("GCD=" + g);

}

int find_gcd(int a, int b)

{

int c;

if(a

{

c = a;

a = b;

b = c;

}

while(true)

{

c = a%b;

if(c==0)

return b;

a = b;

b = c;

}

}

}

}

What is the difference between static and dynamic programming?

in static programming properties, methods and object have to be declared first, while in dynamic programming they can be created at runtime. This is usually due to the fact that the dynamic programming language is an interpreted language.

What is an open framework for holding things?

ok so the real answer is a self or a rack and trust me

What is a key difference between the popular spaceship framework and Garrett Hardin's lifeboat framework?

In the spaceship framework, humans share the limited resoursed of the Earth; in the lifeboat framework, there are enough resources for some and not others. -apex :)

What is method overloading?

Method overloading is when you have multiple methods in a class that have the same name but a different signature.

Ex:

public void print (String s){

}

public void print(int a) {

}

If we use more than one same type of method but different parameters or parameter list with same no. of parameters within same class than it is called methodoverloading.

if we use more than one different type of method within same class than we dont call it method overloading

for example:

public void add(int a , int b){

systemout.println(a+b);

}

public void add(double a , double b){

systemout.println(a+b);

}

public void add(string a , string b){

systemout.println(a+b);

}

What is a member of a class that cannot be externally used?

There are several different keywords in .Net languages that are used to define the "accessability" of a member or method. For example, in C#, the "private" keyword is used to indicate that this member or method cannot be accessed by any instance of the class, nor by any class that inherits from the class. "Protected" is similar to "private" but allows inherited classes to acces those members. "Internal" allows access to those members freely to any class that is also declared in the same assembly.

How do you send message to networked computer with command prompt?

Method 1 You can use the Net Send command which is a messaging service provided by Microsoft allows users to sends messages to other users, computers, or messaging names on the network. Messenger Service should be started on user's computer. The syntax of the Net Send command net send {name | * | /domain[:name] | /users} message Method 2 Use third party LAN messenger. Since the net send command line may not efficient and convenient for daily office communication. Using a specified LAN messenger to transfer message is more popular today. THe link below is a comparison between the advantages and disadvantages of net send command line and LAN messenger.

Compare Hofstede's cultural dimensions with the GLOBE framework?

Hofstede's framework for assessing cultures began in the late 1970's, while in the later future, the GLOBE framework for assessing cultures began in 1993.

Hofstede based his survey on IBM workers in 40 countries and found that both managers and employees vary on five value dimensions of national culture. GLOBE based their data on 825 organizations in 62 countries and they identify nine dimensions of national culture.

Hofstede dimension are power distance, individualism versus collectivism, masculinity versus femininity, uncertainty avoidance, and long-term versus short-term. Some of the GLOBE dimensions are power distance, individualism/collectivism, humane orientation, performance orientation, uncertainty avoidance, gender differentiation, and future orientation.

The two frameworks are very similar and are used to understand the differences of employees from other counties. These frameworks can also be helpful in predicting and explaining behavior of employees.

Do while in vb?

'While' is similar to 'Until', but like an opposite. 'Do While' will loop as long as something is within a certain range

Dim x As Integer = Console.Readline()

Do While x < 10

x = x + 1

Console.Writeline(x)

Next

Dim x As Integer = Console.Readline()

Do Until x >= 10

x = x + 1

Console.Writeline(x)

Next

What is the difference between throw and throws in net?

"throw" is the keyword to raise an exception. "throws" is a Java keyword that indicates a specific method can potentially raise a named exception. There is no analog in VB.Net or C#. Perhaps there is a "throws" keyword in J#?

What is the purpose of having ipEndPoint in .Net 2.0?

The purpose of having ipEndPoint in Net 2.0 is to represent a network endpoint as an IP address and a port number. By combining the host's IP address and port number of a service, the ipEndPoint class forms a connection point to a class.

Where can you get a Jetbrains ReSharper discount?

The best place to check for Jetbrains discount is the Jetbrains website. The company often offers discounts and specials, especially for the those starting a software business.

Why xml is not used to display data?

XML is not easy on the eyes. Charts and tables are.owers

XML is a way to tell the browsers how to diplay the data, but it is not visible as it it sits in the source code of the webpage or domain.

Does net platform support backward compatibility explain?

Yes, the . (dot) net platform supports backward compatibility. This means that newer versions of the platform are compatible with software created using older versions.

What is the difference between a panel object and a groupBox object?

1. Panel can have both Horzontal and Vertical scrollbars while the GorupBox does not have scrollbars.

2. Panel does not have Caption name while the GroupBox have Caption name.

3. We can not enter text in Panel while we can enter text in GroupBox.

What is visual studio NET work area?

The main area is the space that contains the form. It is located under the menus as between the default location of the Toolbox and the Solution Explorer. It is sometimes referred to as the main work area.