Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Dot Net Framework Practical Slip 10 Answers

 Dot Net Framework


 Dot Net Framework

A) Write a program that demonstrates the use of primitive data types in C#. The

 program should also support the type conversion of :

Integer to String

String to Integer

Answer :

namespace WinFormsApp19

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

 

        private void button1_Click(object sender, EventArgs e)

        {

            int num = Convert.ToInt32(textBox1.Text);

            label1.Text = "Before conversion  : " + num.GetType();

            String str = Convert.ToString(num);

            label2.Text = "After conversion: " + str.GetType();

 

        }

 

        private void button2_Click(object sender, EventArgs e)

        {

            label1.Text = "Before conversion  : " + textBox1.Text.GetType();

            int num = Convert.ToInt32(textBox1.Text);

            label2.Text = "After conversion: " + num.GetType();

        }

    }

}

Output :

 

Write a program that demonstrates the use of primitive data types in C#. The   program should also support the type conversion of :  ● Integer to String  ● String to Integer

 B) Write ASP.Net program to connect to the master database in SQL Server in the

 Page_Load event. When the connection is established, the message “Connection has

 been established” should be displayed in a label in the form .

Answer :

Output :


Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Dot Net Framework Practical Slip 10 Answers Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Dot Net Framework Practical Slip 10 Answers Reviewed by technical_saurabh on May 02, 2022 Rating: 5

No comments:

Powered by Blogger.