100% found this document useful (2 votes)
22 views

(eBook PDF) Fundamentals of C# Programming for Information Systems 2nd Edition download

The document is a promotional and informational overview of the eBook 'Fundamentals of C# Programming for Information Systems, 2nd Edition', which teaches C# programming fundamentals for business applications. It highlights new content, including chapters on web application development and object-oriented programming, and is designed for introductory programming courses. The book features hands-on tutorials, review questions, and a focus on graphical user interfaces using Visual Studio.

Uploaded by

picousuchaxe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
22 views

(eBook PDF) Fundamentals of C# Programming for Information Systems 2nd Edition download

The document is a promotional and informational overview of the eBook 'Fundamentals of C# Programming for Information Systems, 2nd Edition', which teaches C# programming fundamentals for business applications. It highlights new content, including chapters on web application development and object-oriented programming, and is designed for introductory programming courses. The book features hands-on tutorials, review questions, and a focus on graphical user interfaces using Visual Studio.

Uploaded by

picousuchaxe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

(eBook PDF) Fundamentals of C# Programming for

Information Systems 2nd Edition download

https://ebookluna.com/product/ebook-pdf-fundamentals-of-c-
programming-for-information-systems-2nd-edition/

Download full version ebook from https://ebookluna.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookluna.com
to discover even more!

(eBook PDF) Fundamentals of C# Programming for Information Systems 2nd


Edition

https://ebookluna.com/product/ebook-pdf-fundamentals-of-c-programming-for-
information-systems-2nd-edition-2/

(eBook PDF) Fundamentals of Information Systems 9th Edition

https://ebookluna.com/product/ebook-pdf-fundamentals-of-information-
systems-9th-edition/

(eBook PDF) Fundamentals of Information Systems 8th Edition

https://ebookluna.com/product/ebook-pdf-fundamentals-of-information-
systems-8th-edition/

Fundamentals of Information Systems 9th Edition Ralph Stair - eBook PDF

https://ebookluna.com/download/fundamentals-of-information-systems-ebook-
pdf/
Essentials of MIS (Management Information Systems), 15th Global Edition
Kenneth C. Laudon - eBook PDF

https://ebookluna.com/download/essentials-of-mis-management-information-
systems-15th-global-edition-ebook-pdf/

Essentials of MIS (Management Information Systems), 15th Global Edition


Kenneth C. Laudon - eBook PDF

https://ebookluna.com/download/essentials-of-mis-management-information-
systems-15th-global-edition-ebook-pdf-2/

(eBook PDF) Management Information Systems for the Information 9th

https://ebookluna.com/product/ebook-pdf-management-information-systems-for-
the-information-9th/

Fundamentals of Ecosystem Science 2nd Edition Kathleen C. Weathers - eBook


PDF

https://ebookluna.com/download/fundamentals-of-ecosystem-science-ebook-pdf/

(eBook PDF) Fundamentals of Communication Systems, Global Edition 2nd


Edition

https://ebookluna.com/product/ebook-pdf-fundamentals-of-communication-
systems-global-edition-2nd-edition/
6.5 Getting User Input from Controls ................................................................................................... 183
6.6 Working with ComboBoxes............................................................................................................ 186
6.7 Working with ListBoxes ................................................................................................................. 196
6.8 Windows Presentation Foundation (WPF) ..................................................................................... 201
Exercises ............................................................................................................................................... 203
Chapter 7: Arrays ................................................................................................205
7.1 Introduction to One-Dimensional Arrays ....................................................................................... 205
Tutorial 1: Working with 1-D Arrays: Test Scores Application ........................................................... 208
7.2 Assigning a Value to an Element of an Array................................................................................. 211
7.3 Accessing Elements of an Array Using the Index .......................................................................... 212
7.4 Accessing Elements of an Array Using the foreach Loop .............................................................. 215
7.5 Copying an Array............................................................................................................................ 217
7.6 Looking Up Values in an Array ...................................................................................................... 221
Tutorial 2: Lookup Units Sold Using 1-D Arrays................................................................................. 222
Exercises ............................................................................................................................................... 224
Chapter 8: Sequential Files and Arrays.............................................................226
8.1 Introduction to Text Files................................................................................................................ 226
Tutorial 1: Reading Text Files .............................................................................................................. 229
8.2 Splitting a Row: Split Method ........................................................................................................ 231
8.3 Reading Data from Files into Arrays .............................................................................................. 234
8.4 Additional Methods of Arrays ........................................................................................................ 241
Tutorial 2: Looking Up Phone Numbers Using Arrays ........................................................................ 242
Tutorial 3: Using a ComboBox to Select the Search Name .................................................................. 246
8.5 Writing to Text Files ....................................................................................................................... 248
Tutorial 4: Writing Scores to Text File ................................................................................................. 248
8.6 SaveFileDialog Control .................................................................................................................. 255
8.7 Passing Arrays to Methods ............................................................................................................. 259
Tutorial 5: Passing Arrays to Compute Average .................................................................................. 259
8.8 Two-Dimensional (2-D) Arrays ...................................................................................................... 263
Tutorial 6: 2-D Array to Find the Sales for a Product........................................................................... 267
Exercises ............................................................................................................................................... 271
Rentals Assignment 2 ........................................................................................................................... 272
Help Desk Assignment 2 ...................................................................................................................... 274
Chapter 9: Collections .........................................................................................276
9.1 Introduction to Collections.............................................................................................................. 276
9.2 List<T> Collection .......................................................................................................................... 278
Tutorial 1: Looking Up Sales Data Using a List ................................................................................... 279
9.3 Dictionary<TKey, TValue> Collection .......................................................................................... 285
Tutorial 2: Dictionary with Product# as Key and Price as Value ......................................................... 287
Tutorial 3: Dictionary with Product# as Key and Sales Array as Value ............................................... 293
Exercises ............................................................................................................................................... 297
Chapter 10: Graphical User Interface: Additional Controls...........................298
10.1 ListView: Features ........................................................................................................................ 298
10.2 Adding Items to ListView ............................................................................................................. 299
Tutorial 1: Selecting a Show from a ListView ..................................................................................... 302
10.3 Accessing Data from a ListView .................................................................................................. 302
10.4 Forms with Tab Pages ................................................................................................................... 308
Tutorial 2: Multipage Form with TabControl ....................................................................................... 308
Exercises ............................................................................................................................................... 310
Chapter 11: Multi-form Applications and Menus ............................................312
11.1 Introduction ................................................................................................................................... 312
11.2 Accessing an Existing Form from Another................................................................................... 313
Tutorial 1: Multi-form Financial Planning Application ........................................................................ 315
11.3 Sharing a Method between Multiple Forms .................................................................................. 318
Tutorial 2: Sharing the LoadDictionary Method between Forms ......................................................... 319
11.4 Closing a Parent Form .................................................................................................................. 325
11.5 Menus............................................................................................................................................ 328
11.6 ToolStrips...................................................................................................................................... 332
Exercises ............................................................................................................................................... 334
Chapter 12: Databases .........................................................................................335
12.1 Introduction ................................................................................................................................... 336
12.2 Creating Database Objects ............................................................................................................ 336
Tutorial 1: Display Employee Records Using the Wizard .................................................................... 337
12.3 Displaying Data in a DataGridView ............................................................................................. 340
12.4 Accessing Data Items from a DataGridView ................................................................................ 346
12.5 Displaying Data in Details View .................................................................................................. 349
12.6 Finding the Record for a Selected Key ......................................................................................... 351
Tutorial 2: Find Employee Records Using the Wizard ......................................................................... 352
12.7 Selecting a Group of Records Using the Binding Source ............................................................. 356
12.8 Selecting Records Using the Table Adapter ................................................................................. 362
Tutorial 3: Parameter Query to Select Records..................................................................................... 363
12.9 Untyped Datasets: Displaying Records......................................................................................... 365
Tutorial 4: Display Records Using Untyped Datasets .......................................................................... 366
12.10 Untyped Datasets: Selecting Records ......................................................................................... 375
Tutorial 5: Select Records Using Untyped Datasets ............................................................................. 377
12.11 Untyped Datasets: Add/Edit/Delete Records .............................................................................. 384
Tutorial 6: Add/Edit/Delete Using Untyped Datasets........................................................................... 385
12.12 Command Object and DataReader .............................................................................................. 394
Tutorial 7: SqlCommand and SqlDataReader to Work with Tables ..................................................... 396
Exercises ............................................................................................................................................... 405
Rentals Assignment 3 ........................................................................................................................... 407
Help Desk Assignment 3 ...................................................................................................................... 407
Chapter 13: Object-Oriented Programming .....................................................414
13.1 Introduction to Objects and Classes .............................................................................................. 415
13.2 Classes versus Objects .................................................................................................................. 415
13.3 Information Hiding (Encapsulation) ............................................................................................. 417
Tutorial 1: Create an Employee Class................................................................................................... 419
13.4 Properties ...................................................................................................................................... 423
Tutorial 2: User Interface and Properties .............................................................................................. 426
13.5 Calling Methods (Sending Messages to Objects) ......................................................................... 434
Tutorial 3: Calling Methods and Passing Data between Forms ............................................................ 435
Exercises ............................................................................................................................................... 448
Chapter 14: Inheritance ......................................................................................450
14.1 Introduction to Inheritance ............................................................................................................ 451
14.2 Implementing Inheritance ............................................................................................................. 452
Tutorial 1: Creating Subclasses ............................................................................................................ 454
14.3 Using Subclasses and Super Classes............................................................................................. 458
14.4 Overriding Methods ...................................................................................................................... 459
Tutorial 2: Implementing the GrossPay Method................................................................................... 462
14.5 Polymorphism ............................................................................................................................... 467
Tutorial 3: Dynamic Dispatch and the ToString Method...................................................................... 468
14.6 Abstract Classes and Interfaces..................................................................................................... 472
Tutorial 4: Interfaces ............................................................................................................................. 473
14.7 Using Interfaces to Sort Collections ............................................................................................. 480
Tutorial 5: Sorting Employees .............................................................................................................. 483
14.8 Access Modifiers in C# ................................................................................................................. 486
Exercises ............................................................................................................................................... 488
Chapter 15: Introduction to Web Applications Development .........................491
15.1 Introduction to Web Applications ................................................................................................. 491
15.2 Creating a Single-Page ASP.NET Website................................................................................... 496
Tutorial 1: Developing a Simple Web Page: Ice Cream Cost ............................................................... 496
15.3 Introduction to HTML .................................................................................................................. 502
15.4 Working with Web Server Controls.............................................................................................. 506
15.5 Validating Data Using Validation Controls .................................................................................. 517
Exercises ............................................................................................................................................... 522
Chapter 16: Web Development: Multipage and Database Applications.......523
16.1 Accessing Databases from Web Forms ........................................................................................ 523
Tutorial 1: Accessing a Database: Theater Tickets Application ........................................................... 524
16.2 Preserving Data during Postbacks Using View State ................................................................... 538
16.3: Multipage Websites and Session State ........................................................................................ 543
16.4 Setting a Page to Its Previous State ............................................................................................... 551
Exercises ............................................................................................................................................... 557
Appendix A: Binary Files ....................................................................................559
A.1 Writing to Binary Files .................................................................................................................. 559
Tutorial: Working with Binary Files ..................................................................................................... 559
A.2 Reading Binary Files ...................................................................................................................... 560
Appendix B: Creating a Database ......................................................................562
Tutorial: Creating HR Database............................................................................................................ 562
Appendix C: Answers to Review Questions ......................................................564
Appendix D: HTML Elements ............................................................................584
Index ......................................................................................................................586
Preface
Mission of the Text
Welcome to Fundamentals of C# Programming for Information Systems. This book teaches the
fundamentals of programming in C# to provide a solid foundation to build business and other real-world
applications. Programming concepts are discussed in the context of familiar practical applications that use
graphical interfaces.

New to This Edition


A key goal of the new edition was to add significant content so that the book could be used in a two-
course sequence in programming. Four new chapters have been added: Two chapters that provide a
comprehensive introduction to web applications development, and two other chapters on the concepts and
practice of object-oriented programming, including inheritance.
Several other updates were made based on feedback from instructors: a second set of three comprehensive
assignments (in chapters 3, 8, and 12), additional end-of-chapter exercises, and learning objectives for
each chapter.

Target Audience
This book is designed for introductory programming courses in IS/MIS, CIS and IT. This book also
would fit into a computer science curriculum with an introductory course that uses a GUI-based
application-oriented approach to teach programming concepts. The breadth and depth of coverage makes
this book suitable for a two-course sequence, particularly when students come to the first course with no
programming background and a slower pace is desired. An approach in a two-course sequence would be
to do in-depth coverage of topics like collections, databases, object-oriented programming, web
development, and others presented in later chapters only in the second course.

Key Features
A key feature of the book is that programming concepts are introduced in small chunks through examples
and illustrations accompanied by hands-on tutorials. The tutorials, which are interspersed with the
concepts, help students apply and explore what they learn immediately. Additionally, review questions
and exercises within the chapters enhance student interest and learning.
Although the book is written for beginners, it is thorough and concise. Graphical illustrations and
screenshots are used throughout the book to enhance learning for both beginners and experienced
students.
Windows forms are used from the beginning to provide GUI-based as opposed to console-based interface.
This book builds graphical user interfaces and code in the .Net environment using Visual Studio. You are
encouraged to use the current free version, Visual Studio Community 2017. Earlier versions, including
Visual Studio 2015, Visual Studio Express and Visual Studio 2013, generally work well, except that you
won’t be able to run a few programs that use certain features available only in C# version 7.1 or greater.
ii

Supplements
For Students: Tutorial_Starts.zip file that contains
o Partially completed projects for tutorials
o Data files/databases used in projects

You may download the Tutorial_Starts.zip file from


http://www.prospectpressvt.com/titles/c-sharp-programming/student-resources/

For Instructors: Instructor resources include


o Completed tutorials
o PowerPoint slides for all chapters
o Test bank
o Partially completed projects for tutorials
o Data files/databases used in projects

To access instructor resources, please complete the request form at


http://www.prospectpressvt.com/faculty-resources/instructors-material/

Installing Visual Studio


You may download Visual Studio Community 2017 from the following website:
https://www.visualstudio.com/downloads/

To install Visual Studio, open the downloaded .exe file and run it.

Overview of the Content and Organization


Every possible sequence of topics seems to put constraints on the quality of illustrative examples and
applications that can be used in a chapter. The organization of chapters in this book attempts to minimize
such problems and to enhance the ability to build on prior chapters. However, except for the foundational
Chapters 1–5, there is significant flexibility in choosing specific topics and the depth of coverage. As
suggested by the dependencies summarized below, there is some flexibility in the sequencing too.
Chapters 1–5 cover the Visual Studio environment and introductory programming concepts, including
methods. These chapters, which provide the foundational knowledge, should be covered in sequence
before other chapters, though certain topics like working with dates and times (section 2.4) may be
postponed or skipped.
Chapter 6 presents the application of the GUI controls ScrollBars, RadioButtons, CheckBoxes,
ComboBoxes and ListBoxes.
Chapter 7 provides a detailed presentation of one-dimensional arrays, and Chapter 8 presents accessing
sequential files and using arrays in combination with files. Chapter 6 is not a prerequisite for Chapters 7
or 8. GUI is presented early on in Chapter 6 to motivate students with more interesting graphical
interfaces. It should be noted that the comprehensive assignment (Assignment 2) specified at the end of
Chapter 8 requires the use of several GUI controls.
Chapter 9 introduces collections, and discusses the List and Dictionary collections in more detail. Chapter
8 (“Sequential Files and Arrays”) is a prerequisite for this chapter. Because of the close relationship
iii

between collections and arrays, collections are presented in this book immediately following Chapter 8 on
arrays.
Chapter 10 discusses the application of ListView and TabControl. The dependency of this chapter on
Chapter 9 (“Collections”) is very low. The prerequisite for this chapter includes Chapters 6 and 8.
Chapter 11 presents multiform applications, Menus and ToolStrips. This chapter has some dependency on
previous chapters, except Chapter 10.
Chapter 12 provides in-depth coverage of accessing databases from C# programs. Chapter 6 is a
prerequisite for this chapter. In addition, the ListView control presented in Chapter 10 is used in an
example in the last part of this chapter, and it is required in the third comprehensive assignment
(Assignment 3) at the end of this chapter. Assignment 3 also requires the use of MainMenu control
discussed in Chapter 11. Other than that, the dependence of Chapter 12 on Chapters 7–11 is relatively
low.
Chapter 13 provides an introduction to object-oriented programming (OOP) principles and techniques.
The initial part of this chapter may be used for an introduction to OOP early in the semester.
Chapter 14 describes the concept of inheritance, implementation of inheritance, subclasses and super
classes, overriding methods and polymorphism. Chapter 13 is a prerequisite for this chapter, and it also
relies on collections from Chapter 9.
Chapter 15 presents the concepts of web applications development, and develops simple web applications
using the ASP.Net platform in the Visual Studio environment. Only the basic programming knowledge
presented in Chapters 1–3 is required for this chapter.
Chaper 16 describes how to access SQL Server databases and develop multipage web projects. Basic
programming concepts presented in Chapters 1–6, the concept of collections from Chapter 9, and basic
database concepts including binding controls to a database and filtering records (Chapter 12) are used in
building the application.
iv

Acknowledgments
I am thankful for the valuable assistance provided by many people in the preparation of this book. I wish
to thank Dr. Jakob Iversen, The University of Wisconsin–Oshkosh, for authoring Chapters 13 and 14 on
Object-Oriented Programming.
I was fortunate to work with Beth Lang Golub, editor and president of Prospect Press, who was flexible
and supportive of my goal to offer a good quality programming textbook at a reasonable price. Special
thanks go to Susan Hegedus, Kathy Bond Borie and Rachel Paul for their painstaking attention to detail in
editing this book, and to Annie Clark for the cover design.
I wish to acknowledge the contributions of the following reviewers for their valuable guidance in
improving the presentation and contents of this book:
Janet Bailey, University of Arkansas at Little Rock
Wei Kian Chen, Champlain College
Clinton Daniel, University of South Florida
Silvana Faja, University of Central Missouri
Joni L. Jones, University of South Florida
David Pumphrey, Colorado Mesa University
Manonita M. Ratwatte, University of Oklahoma (Retired)
Theadora Ross, University of Arkansas at Little Rock
David M. Weber, Northern Arizona University
Thanks are also due to the instructors who provided valuable feedback on the first edition of this book
through user surveys:
Janet Bailey, University of Arkansas, Little Rock
Jeff Dickson, Oregon Institute of Technology
Ruth Lamprecht, Virginia Union University
Panos Linos, Butler University
Ziping Liu, Southeast Missouri State University
Robert Pilgrim, Murray State University
Kris Rosenberg, Oregon Institute of Technology
Doug Titus, University of North Florida

About the Author


Dr. George Philip is Professor Emeritus of Information Systems at the College of Business, The
University of Wisconsin–Oshkosh. He has more than twenty-five years of teaching and consulting
experience in the information systems field, including computer programming in multiple languages. He
also served as chair of the Information Systems Team, and director of the M.S. in Information Systems
program. He has published numerous articles in this field.
Chapter 1

Introduction to Visual Studio and Programming

Welcome to programming in C# language. In this chapter, you will learn to develop simple programs in
the Visual Studio development environment, and to work with different types of data.
Learning Objectives
After studying this chapter, you should be able to:
 Identify the inputs, processes and outputs of a software system.
 Describe the steps involved in developing a computer program.
 Describe the terms: syntax, logic and runtime errors, machine language, low-level language, high-
level language, compiler and interpreter.
 Develop a simple form in Visual Studio to accept user input, do calculations and display
formatted output.
 Work with Label, TextBox, Button, ListBox and MessageBox.
 Develop simple programs that use constants, variables and expressions.
 Use try-catch method to catch errors.

Topics

1.1 Introduction to Programming 1.8 Working with Variables


1.2 Introduction to Visual Studio 1.9 Doing Calculations
1.3 Visual Studio Environment 1.10 Formatting and Displaying Output in a Label
1.4 Adding Controls to a Form 1.11 Additional Concepts: Constants, Scope of
1.5 The Code Editor Window Variables and ListBox
1.6 Introductory Programming Concepts 1.12 Exception Handling: Catching Errors
1.7 Data Types

1.1 Introduction to Programming


Programming is the process of developing computer programs. If a computer program seems like a
mystery to you, it is just a set of instructions telling the computer how to do a task, like looking up the
price of an item or finding the Chinese restaurants in a city.
Unfortunately, computers cannot understand normal English. So, programs have to be written using
special commands and statements according to strict rules. A key aspect of programming is breaking
down what you want the computer to do, into detailed instructions. Like the directions that a GPS gives
you to get to a place, the instructions in a program need to be precise.

Fundamentals of C# Programming for


Information Systems
2 1.1 Introduction to Programming

Typically, a program uses one or more data items to produce some results. For example, a program that
processes an order might use the item number and order quantity to compute the subtotal, sales tax and
total cost, as represented in Figure 1-1.

Figure 1-1: Inputs, process and outputs of a program

Subtotal
Item# Process
Sales tax
Quantity Order
Total cost

The program, represented by the block “Process Order,” may include multiple subtasks like look up the
unit price, check inventory and compute results.
The data that are used by a program are called the input to the program, and the results produced are
called the output of the program. In addition to processing input data to produce the output, a program
might write data to and read data from storage devices like a flash drive or a hard drive, as represented in
Figure 1-2.

Figure 1-2: A general representation of a software system

How Do I Go About Developing a Program?


To understand the process of developing a program, let’s use a simplified order-processing system as an
example. To develop good programs and do so efficiently, follow these steps:
1. Define the purpose, and identify the input, process and output of the program.
2. Design and develop the graphical user interface (GUI).
3. Identify the components and logic of the program.
4. Design and develop files/databases, if any.
5. Write and test the code.
Let’s look at these steps in more detail.

1. Define the purpose, and identify input/process/output


Before you can write the program, you need to lay some groundwork. In this step, you identify what the
user wants the program to do, including the input, process and output of the program.
Depending on the size and complexity of the program, this could involve extensive analysis of the
requirements, including interviews with users; examination of current forms, reports and transactions; and
identifying processes like checking inventory and looking up price in an order.

Fundamentals of C# Programming for


Information Systems
Chapter 1: Introduction to Visual Studio and Programming 3

Here is an example of a simplified statement of the purpose of the order processing program:
Purpose: Compute and display the subtotal, sales tax and total cost for an order
The output of the program often follows from the purpose. For this example, the output would be
Output: subtotal, sales tax, total cost
The process specifies not only what the program should do (e.g., compute total cost) but also how it
should be done (e.g., how to compute total cost), as follows:
Process: (What?) Look up unit price, look up sales tax rate,
compute subtotal, sales tax and total cost
(How?) subtotal: unit price * order quantity
sales tax: subtotal * sales tax rate
total cost: subtotal + sales tax

Specifying the process also would include identifying the sources of data, like the product file to get the
unit price and sales tax file to get the sales tax rate.
The input specifies the data items that are needed to carry out the process to produce the output. The
input for this order-processing system would be
Input: item number, order quantity
Note that unit price and sales tax rate are not included in the input because the program looks them up. A
real-world system would be a lot more complex. Typically, the process would include additional subtasks
like handling orders when inventory is insufficient, and output may include various reports. In such
systems, graphical methods like Data Flow Diagrams and UML diagrams are used to represent the
processes and the data accessed by them.

2. Design and develop the graphical user interface (GUI)


After identifying the input, process and output of a program, you design and create the user interface—
that is, how the user would interact with the program, and how the program would communicate with the
user. This is the fun part where you bring in your creativity.
Typically, you use forms to interact with the program. As you will learn in the next section, forms have
various types of objects, called controls, such as Button, TextBox and Label. In this step, you identify the
type of controls to be used, specify their names and captions as appropriate, and design the layout. Figure
1-3 shows an example of the GUI for a simplified order-processing system where the user doesn’t provide
the unit price and sales tax rate.

Fundamentals of C# Programming for


Information Systems
4 1.1 Introduction to Programming

Figure 1-3: GUI for an order-processing system

3. Identify the components and logic of the program


This step identifies the major subtasks of the program. For example, in order to process an order, the
program needs to do the following subtasks:
Get Item# and quantity
Look up unit price and tax rate
Compute subtotal, sales tax and total cost
Display subtotal, sales tax and total cost

Again, a real-world program may have to do additional subtasks, like checking the inventory to make sure
there is sufficient quantity on stock.
For relatively simpler programs, after identifying the subtasks, you may go directly to writing the
program for each subtask. However, for tasks involving more complex logic, it might help to develop an
outline of the logic of performing the subtasks. The representation of the logic of a program in plain
English is called pseudo code. You also may represent the logic graphically using a flowchart, as
discussed in Chapter 3.

4. Design and develop files/databases


If data is read from or written to files and/or databases, these are designed and developed prior to writing
the program. Depending on the application, this step may have to be done in parallel with previous steps.

5. Write and test the code


The final step is to write and test the code. You can program in a variety of languages. C#, Java, Visual
Basic, Python and PHP are among the popular languages. You will use C#, which is a popular language
for developing desktop and web applications.
Programing may involve iteratively developing an application by going through the above steps multiple
times.

Syntax, Logic and Runtime Errors


The programming statements you write have to follow strict rules of the language, called the syntax. The
program wouldn’t compile if it had any syntax error, like a missing semicolon at the end of a statement
or a misspelled key word. Compiling is the process of translating the program you write, called the

Fundamentals of C# Programming for


Information Systems
Chapter 1: Introduction to Visual Studio and Programming 5

source code, to another language before running a program, as described in the next section. So, your
first task is to make sure that there are no syntax errors. The good news is that Visual Studio provides a
lot of help in identifying syntax errors.
After the syntax errors are eliminated, the program may run. But, it’s still too early to celebrate because
the results could be incorrect due to errors in the program logic, just like you can write a grammatically
correct sentence that doesn’t convey the intended message. Errors that cause a program to produce
incorrect or unintended results are called logic errors. A tax-filing software using the wrong tax rate and
a billing software overcharging a customer are examples of logic errors.
There are errors other than logic errors that can occur at runtime. These are called runtime errors.
Runtime errors cause the program to crash (unless the program catches and handles such errors) because
the program asks the computer to do something it is unable to do, like accessing a file with an invalid path
or dividing a number by zero.
The process of identifying errors (bugs) is called debugging. Testing programs to identify and eliminate
errors is an extremely important part of developing software.

Review Questions
1.1 Consider Google as a software system. What would be the input, process and output for Google?
1.2 Consider a software system that enrolls students into classes. Identify some key inputs that the
system needs every time a student enrolls in a class, and the subtasks (process) that need to be
performed. What are some outputs the system should produce for students and instructors?
1.3 List the major steps in developing a program.
1.4 Incorrect punctuation in a program is an example of what type of error?
1.5 A payroll program uses the wrong formula to compute overtime pay. What type of error is it?
1.6 True or false: A program that doesn’t have any syntax errors should produce the correct results.

1.2 Introduction to Visual Studio


In this section, you will learn how to use Visual Studio (VS) to create the user interface and write C#
programs. Visual Studio is an integrated development environment (IDE) for developing applications in a
variety of languages, including C#, Visual Basic, C++, Python and HTML/JavaScript. VS supports
development of desktop and web applications for Windows, Android and iOS. A major strength of Visual
Studio is that it provides a user-friendly environment for developing applications.

Installing Visual Studio


You may download Visual Studio Community 2017 from the following website:
https://www.visualstudio.com/downloads/
To install Visual Studio, open the downloaded vs_community.exe file. The installation software will
guide you through the process. The first time you start Visual Studio, you will be asked to choose the
Development Settings and a Color Theme. Choose Visual C# for settings. You may change these settings
later, as described in Tutorial 1.

Fundamentals of C# Programming for


Information Systems
6 1.2 Introduction to Visual Studio

Components of Visual Studio


Though you have the choice to write programs in a variety of languages, the CPU can understand only
Machine Language, which is extremely difficult for humans to understand. Machine Language requires
detailed instructions that consist of patterns of bits (0 and 1), like 10001010, and are dependent on the
machine (the specific type of computer). Because of the need to write detailed machine-dependent
instructions, Machine Language is called a low-level language.
Except in special cases, programs are written in high-level languages, like C#, which require fewer
statements, are less dependent on the hardware and are easier to understand because they use words rather
than patterns of bits.
Programs written in high-level languages are translated to Machine Language before they are run.
Different languages use different methods to translate and run programs. Many languages use a special
software called a compiler to translate the source code to Machine Language. The compiler typically
produces a separate executable Machine Language program that can be run any number of times without
having to compile every time it is run.
Some programming languages use an interpreter that translates each statement to Machine Language
and runs it without producing an executable program. So, every time the program is run, it needs to be
translated to Machine Language.
Visual Studio uses a compiler, but it translates the source code to an intermediate language, which is
translated to Machine Language and run using another software, as described later in this section. Thus,
Visual Studio translates your statements to Machine Language in two steps:
First, a compiler converts the source code into a language called Microsoft Intermediate Language (IL).
The compiled code, along with references to prebuilt programs (called classes), is stored in an executable
file called Microsoft Intermediate Language (IL) Assembly. Such files have the extension .exe or .dll.
Next, another software called Common Language Runtime (CLR) translates the assemblies from
Intermediate Language to Machine Language and executes the programs. The process of translating and
running the source code may be represented as follows:

The products that support developing and running programs within the Visual Studio family include the
following:
1. An Integrated Development Environment (IDE)
An IDE provides an environment to develop programs, which includes code editors for Visual
C#, Visual Basic, Visual J#, Visual C++, HTML and XML, and designers for Windows forms
and web forms.
In Visual Studio, a software application typically is organized into Projects that may contain one
or more forms.
Forms provide the user interface that allows users to input data for the program, to interact with
the program and to display results.

2. A compiler that translates the source code into Microsoft Intermediate Language (MSIL)

Fundamentals of C# Programming for


Information Systems
Chapter 1: Introduction to Visual Studio and Programming 7

3. .Net Framework, which includes


a. the Common Language Runtime (CLR) that translates the assemblies from Intermediate
Language to Machine Language and executes the programs, and
b. .Net Framework Class Library that includes a large number of prebuilt programs called
classes.

Running a program, as described earlier, consists of (1) the compiler translating the source code (the
project) into Microsoft Intermediate Language Assembly and (2) the Common Language Runtime
translating the assemblies from Intermediate Language to Machine Language and executing the program
to produce the output. Next, we will look at how to work with Visual Studio to develop C# programs.

Review Questions
1.7 What is the only programming language that the CPU can understand?
1.8 What is a compiler?
1.9 What is an interpreter?
1.10 What is Microsoft Intermediate Language Assembly?
1.11 What is the function of Common Language Runtime in Visual Studio?

Creating an Application in Visual Studio


To become familiar with the Visual Studio environment, let’s create an application for an ice cream
parlor, consisting of a simple Windows form to compute and display the cost for an order of ice cream.
We will follow the five steps identified earlier to develop it:

1. Define the purpose


Purpose: Compute and display the total cost for an order of ice cream
Input: Unit price, number of scoops
Process: Compute total cost
Total cost: unit price * number of scoops
Output: Total cost

2. Design and develop the Graphical User Interface (GUI)

Figure 1-4 presents the design of the form that shows the user interface to let the user enter the number of
scoops and unit price to display the cost. You will create the form in Tutorial 1.

Fundamentals of C# Programming for


Information Systems
8 1.2 Introduction to Visual Studio

Figure 1-4: Windows form to compute ice cream cost

3. Identify the components and logic of the program


The major subtasks include
Get number of scoops and unit price
Compute cost
Display cost

4. Design and develop files/databases


This application doesn’t involve the use of files or databases.

5. Write and test the code


To understand the process of developing the entire application, including the code, let’s create the form
presented in step 2 and write the code for the tasks identified in step 3.

Creating a Windows Form


In Visual Studio, forms are created within a Project. Typically, all forms within a Project relate to a
common task. Creating a project also creates a Solution, which is a container for one or more projects.
Each project we discuss in this book is in a separate solution that has the same name as the project.
Tutorial 1 creates the project and the form to compute the cost of an order of ice cream.

Fundamentals of C# Programming for


Information Systems
Chapter 1: Introduction to Visual Studio and Programming 9

Tutorial 1: Creating a Form: Ice Cream Cost


Step 1-1: Open Visual Studio Community 2017. You will see the start page, shown in Figure 1-5.

Figure 1-5: Visual Studio Start Page

First, you will change some settings.

Changing default settings in Visual Studio


Step 1-2: Change the default folder to save your projects:
Select Tools, Options. Expand Projects and Solutions and select Location.
For Projects Location, select a folder (e.g., your flash drive) where you will save your projects.
Step 1-3: Change the setting to automatically save projects when they are created:
Select General from Projects and Solutions.
Make sure that the CheckBox for Save new projects when created is checked. Click OK.

You may change the color theme by selecting Environment, General from the Options window.
Similarly, you may reset your settings by selecting Tools, Import and Export Settings, Reset all
Settings.
Close Options window.

Fundamentals of C# Programming for


Information Systems
10 Tutorial 1: Creating a Form: Ice Cream Cost

Creating a new project


Step 1-4: Create a new project:
Click Create New Project on the Start page.
You will see the New Project window displayed in Figure 1-6.

Figure 1-6: New Project window

Select Visual C# from Templates, Other Languages. For the type of application, select Windows
Forms Application, as shown in Figure 1-6.
For Name, enter Ch1_IntroProgramming.
Select the Location, if different from the default folder.
Leave the CheckBox for Create directory for solution unchecked so that both the Project and the
Solution will be created in the same folder. (If there are multiple Projects within a Solution, it
would be better to have separate directories for the Solution and Projects.) Note that the default
name for the Solution is the same as that of the Project.) Click OK.
The Visual Studio development environment appears, as shown in Figure 1-7.

Fundamentals of C# Programming for


Information Systems
Discovering Diverse Content Through
Random Scribd Documents
the name of the cross alone, what had been made a matter of faith
and law and religion—they saw how the sign of the cross had been
degraded. For in the sign of the cross lying and deceit had been
victorious, under this seal institutions had become fossilized, and
had sunk into all manner of degradation, so that this sign came to
be represented as the epitome and root of all evil. Thus in another
form they completed the Reformation that Luther began. This
concrete had manifold forms; social instincts in the practical sphere,
laws of nature in the theoretical. There is present the absolute
impulse to find a compass immanent in themselves, i.e. in the
human mind. For the human mind it is imperative to have a fixed
point such as this, if, indeed, it is to be within itself, if it is to be free
in its own world at least. But this striving after really present vitality
took forms which as by-paths were themselves one-sided. In this
striving after unity, which was, however, concrete unity, the further
varieties of the content likewise lie.
On the theoretic side of their philosophy, therefore, the French
proceeded to materialism or naturalism, because the requirements of
the understanding, as abstract thought, which from a firmly fixed
principle allows the most monstrous consequences to be drawn,
drove them to set up one principle as ultimate, and that a principle
which had at the same time to be present and to lie quite close to
experience. Hence they accept sensation and matter as the only
truth, to which must be reduced all thought, all morality, as a mere
modification of sensation. The unities which the French propounded
were in this way one-sided.

a. Opposition of Sensation and Thought.

To this one-sidedness belongs the opposition between sentir and


penser, or else, if you like, their identity, making the latter only a
result of the former; there is not, however, any speculative
reconciliation of this opposition in God, such as we find in Spinoza
and Malebranche. This reduction of all thought to sensation, which in
certain respects took place with Locke, becomes a widely extended
theory. Robinet (De la Nature, T. I. P. IV. chap. iii. pp. 257-259) lights
also on this opposition, beyond which he does not get, that mind
and body are not separate, but that the manner in which they are
united is inexplicable. The Système de la Nature (T. I. chap. x. p.
177) is marked by an especially plain reduction of thought to
sensation. The leading thought is this: “Abstract thoughts are only
modes in which our inmost organ views its own modifications. The
words goodness, beauty, order, intelligence, virtue, &c., have no
meaning for us if we do not refer and apply them to objects which
our senses have shown to be capable of these qualities, or to modes
of being and acting which are known to us.” Thus even psychology
passed into materialism, as for instance we may find in La Mettrie’s
work L’homme Machine: All thought and all conception have
meaning only if they are apprehended as material; matter alone
exists.

b. Montesquieu.

Other great writers have opposed to the above the feeling in the
breast, the instinct of self-preservation, benevolent dispositions
towards others, the impulse to fellowship, which last Puffendorf also
made the foundation of his system of law (supra, p. 321). From this
point of view much that is excellent has been said. Thus
Montesquieu, in his charming book, L’Esprit des Lois, of which
Voltaire said it was an esprit sur les lois, regarded the nations from
this important point of view, that their constitution, their religion, in
short, everything that is to be found in a state, constitutes a totality.

c. Helvetius.

This reduction of thought to feeling in the case of Helvetius takes


the form that if in man as a moral being a single principle is sought,
this ought to be called self-love, and he endeavoured to demonstrate
by ingenious analysis that whatever we term virtue, all activity and
law and right, has as its foundation nothing but self-love or
selfishness, and is resolvable thereinto.[311] This principle is one-
sided, although the “I myself” is an essential moment. What I will,
the noblest, the holiest, is my aim; I must take part in it, I must
agree to it, I must approve of it. With all self-sacrifice there is always
conjoined some satisfaction, some finding of self; this element of
self, subjective liberty, must always be present. If this is taken in a
one-sided sense, there may be consequences drawn from it which
overthrow all that is sacred; but it is found in equal degree in a
morality as noble as any possibly can be.

d. Rousseau.

In connection with the practical side of things this particular must


also be noted, that when the feeling of right, the concrete practical
mind, and, speaking generally, humanity and happiness were made
the principle, this principle, universally conceived, had certainly the
form of thought; but in the case of such concrete content derived
from our impulse or inward intuition, even though that content were
religious, the thought itself was not the content. But now this further
phase appeared, that pure thought was set up as the principle and
content, even if again there was lacking to this content the true
consciousness of its peculiar form; for it was not recognized that this
principle was thought. We see it emerge in the sphere of will, of the
practical, of the just, and so apprehended that the innermost
principle of man, his unity with himself, is set forth as fundamental
and brought into consciousness, so that man in himself acquired an
infinite strength. It is this that Rousseau from one point of view said
about the state. He investigated its absolute justification, and
inquired as to its foundation. The right of ruling and associating, of
the relation of order, of governing and being governed, he
apprehends from his own point of view, so that it is made to rest
historically on power, compulsion, conquest, private property, &c.
[312]

Rousseau makes free-will the principle of this justification, and


without reference to the positive right of states he made answer to
the above question (chap. iv. p. 12), that man has free-will, because
“liberty is the distinguishing feature of man. To renounce his liberty
signifies to renounce his manhood. Not to be free is therefore a
renunciation of a man’s rights as a human being, and even of his
duties.” The slave has neither rights nor duties. Rousseau therefore
says (chap. vi. p. 21): “The fundamental task is to find a form of
association which will shield and protect with the power of the whole
commonwealth combined the person and property of every one of
its members, and in which each individual, while joining this
association, obeys himself only, and thus remains as free as before.
The solution is given by the Social Contract;” this is the association
of which each is a member by his own will. These principles, thus
abstractly stated, we must allow to be correct, yet the ambiguity in
them soon begins to be felt. Man is free, this is certainly the
substantial nature of man; and not only is this liberty not
relinquished in the state, but it is actually in the state that it is first
realized. The freedom of nature, the gift of freedom, is not anything
real; for the state is the first realization of freedom.
The misunderstanding as to the universal will proceeds from this,
that the Notion of freedom must not be taken in the sense of the
arbitrary caprice of an individual, but in the sense of the rational will,
of the will in and for itself. The universal will is not to be looked on
as compounded of definitively individual wills, so that these remain
absolute; otherwise the saying would be correct: “Where the
minority must obey the majority, there is no freedom.” The universal
will must really be the rational will, even if we are not conscious of
the fact; the state is therefore not an association which is decreed
by the arbitrary will of individuals. The wrong apprehension of these
principles does not concern us. What does concern us is this, that
thereby there should come into consciousness as content the sense
that man has liberty in his spirit as the altogether absolute, that
free-will is the Notion of man. Freedom is just thought itself; he who
casts thought aside and speaks of freedom knows not what he is
talking of. The unity of thought with itself is freedom, the free will.
Thought, as volition merely, is the impulse to abrogate one’s
subjectivity, the relation to present existence, the realizing of
oneself, since in that I am endeavouring to place myself as existent
on an equality with myself as thinking. It is only as having the power
of thinking that the will is free. The principle of freedom emerged in
Rousseau, and gave to man, who apprehends himself as infinite, this
infinite strength. This furnishes the transition to the Kantian
philosophy, which, theoretically considered, made this principle its
foundation; knowledge aimed at freedom, and at a concrete content
which it possesses in consciousness.
D. The German Illumination.
The Germans were at this time quietly drifting along in their
Leibnitzo-Wolffian philosophy, in its definitions, axioms and proofs.
Then they were gradually breathed upon by the spirit of foreign
lands, they made acquaintance with all the developments which
there came to pass, and took very kindly to the empiricism of Locke;
on the other hand they at the same time laid aside metaphysical
investigations, turned their attention to the question of how truths
can be grasped by the healthy human understanding, and plunged
into the Aufklärung and into the consideration of the utility of all
things—a point of view which they adopted from the French. Utility
as the essence of existent things signifies that they are determined
as not being in themselves, but for another: this is a necessary
moment, but not the only one. The German Aufklärung warred
against ideas, with the principle of utility as its weapon. Philosophic
investigations on this subject had degenerated into a feeble popular
treatment of it which was incapable of going deeper; they displayed
a rigid pedantry and an earnestness of the understanding, but were
unspiritual. The Germans are busy bees who do justice to all
nations, they are old-clothesmen for whom anything is good enough,
and who carry on their haggling with everyone. Picked up as it was
from foreign nations, all this had lost the wit and life, the energy and
originality which with the French had made the content to be lost
sight of in the form. The Germans, who honestly sift a matter to its
root, and who would put rational arguments in the place of wit and
vivacity, since wit and vivacity really prove nothing, in this way
reached a content which was utterly empty, so much so that nothing
could be more wearisome than this profound mode of treatment;
such was the case with Eberhard, Tetens, and those like them.
Others, like Nicolai, Sulzer and their fellows, were excellent in
their speculations on questions of taste and the liberal sciences; for
literature and art were also to flourish among the Germans. But with
all this they only arrived at a most trivial treatment of æsthetics—
Lessing[313] called it shallow chatter. As a matter of fact, indeed, the
poems of Gellert, Weisse and Lessing sank almost, if not quite as
much into the same poetic feebleness. Moreover, previous to the
philosophy of Kant, the general principle was really the theory of
happiness, which we have already met with in the philosophy of the
Cyrenaics (Vol. I. p. 477), and the point of view of pleasant or
unpleasant sensations held good among the philosophers of that
time as an ultimate and essential determination. Of this manner of
philosophizing I will quote an example which Nicolai gives in the
account of a conversation which he had with Mendelssohn: what is
in question is the pleasure in tragic subjects which is held to be
awakened even by means of the unpleasant emotions depicted in a
tragedy:

Herr Moses.
“The power of having an inclination for perfections and of
shunning imperfections is a reality.” Therefore the exercise of
this power brings a pleasure with it, which, however, is in
nature comparatively less than the displeasure which arises
from the contemplation of the object.
I.
Yet even then, when the violence of passion causes us
unpleasant sensations, the movement (what else is this
movement than the power of loving perfections, &c.?) which
it brings with it has still delights for us. It is the strength of
the movement which we enjoy, even in spite of the painful
sensations which oppose what is pleasant in the passion, and
in a short time obtain the victory.
Herr Moses.
In a stage play, on the contrary, as the imperfect object is
absent, pleasure must gain the upper hand and eclipse the
small degree of displeasure.
I.
A passion therefore which is not followed by these results
must be altogether pleasant. Of this sort are the imitations of
the passions which the tragedy affords.”[314]

With such vapid and meaningless drivel they rambled on. In


addition to these, the eternity of punishment in hell, the salvation of
the heathen, the difference between uprightness and godliness,
were philosophic matters on which much labour was expended
among the Germans, while the French troubled themselves little
about them. Finite determinations were made to hold good against
the infinite; against the Trinity it was asserted that One cannot be
Three; against original sin, that each must bear his own guilt, must
have done his own deeds of himself, and must answer for them; in
the same way against redemption, that another cannot take upon
himself punishment that is due; against forgiveness of sin, that what
is done cannot be rendered undone; to sum up generally, the
incommensurability of the human nature with the divine. On the one
side we see healthy human understanding, experience, facts of
consciousness, but on the other side there was still in vogue the
Wolffian metaphysics of the dry, dead understanding; thus we see
Mendelssohn take his stand by the healthy human understanding,
and make it his rule.
Some movement was brought into this authority, which had
settled into perfect peace and security and let no dreams of other
matters cross its path, by the chance dispute of Mendelssohn with
Jacobi, first as to whether Lessing had been a disciple of Spinoza,
and then regarding the doctrines of Spinoza himself. On this
occasion it came to light how much Spinoza was really forgotten,
and in what horror Spinozism was held. But while Jacobi in this way
once more unexpectedly brought to remembrance in connection with
Spinozism a quite different content of philosophy, faith, i.e. the
simply immediate certainty of external, finite things, as well as of the
divine (which faith in the divine he called reason) was certainly
placed by him, as an independent thinker, in opposition to mediating
knowledge, which he apprehended as mere understanding. This
continued until Kant gave a new impulse in Germany to philosophy,
which had died out in the rest of Europe.
As far as the transition to modern German philosophy is
concerned, it is from Hume and Rousseau, as we have said (pp. 369,
374, 402), that it took its start. Descartes opposes extension to
thought, as what is simply one with itself. He is charged with
dualism, but, like Spinoza and Leibnitz, he did away with the
independence of the two sides, and made supreme their unity, God.
But, as this unity, God is first of all only the Third; and He is further
determined in such a way that no determination pertains to Him.
Wolff’s understanding of the finite, his school metaphysics generally,
his science of the understanding, and his divergence into the
observation of nature, after it has grown strong in its conformity
with law and in its finite knowledge, turns against the infinite and
the concrete determinations of religion, and comes to a standstill
with abstractions in his theologia naturalis; for the determinate is his
domain. But from this time an utterly different point of view is
introduced. The infinite is transported into abstraction or
incomprehensibility. This is an incomprehensible position to adopt.
Nowadays it is looked on as most pious, most justifiable. But as we
see the third, the unity of differences, defined as something which
cannot be thought or known, this unity is not one of thought, for it is
above all thought, and God is not simply thought. Nevertheless this
unity is defined as the absolutely concrete, i.e. as the unity of
thought and Being. Now we have come so far that this unity is a
unity simply in thought, and pertaining to consciousness, so that the
objectivity of thought—reason—comes forth as One and All. This is
dimly conceived by the French. Whether the highest Being, this
Being divested of all determination, is elevated above nature, or
whether nature or matter is the highest unity, there is always
present the establishing of something concrete, which at the same
time belongs to thought. Since the liberty of man has been set up as
an absolutely ultimate principle, thought itself has been set up as a
principle. The principle of liberty is not only in thought but the root
of thought; this principle of liberty is also something in itself
concrete, at least in principle it is implicitly concrete. Thus far have
general culture and philosophic culture advanced. Since what is
knowable has now been placed entirely within the sphere of
consciousness, and since the liberty of the spirit has been
apprehended as absolute, this may be understood to mean that
knowledge has entered altogether into the realm of the finite. The
standpoint of the finite was at the same time taken as ultimate, and
God as a Beyond outside consciousness; duties, rights, knowledge of
nature, are finite. Man has thereby formed for himself a kingdom of
truth, from which God is excluded; it is the kingdom of finite truth.
The form of finitude may here be termed the subjective form; liberty,
self-consciousness [Ichheit] of the mind, known as the absolute, is
essentially subjective—in fact it is the subjectivity of thought. The
more the human reason has grasped itself in itself, the more has it
come down from God and the more has it increased the field of the
finite. Reason is One and All, which is at the same time the totality
of the finite; reason under these conditions is finite knowledge and
knowledge of the finite. The question is, since it is this concrete that
is established (and not metaphysical abstractions), how it constitutes
itself in itself; and then, how it returns to objectivity, or abrogates its
subjectivity, i.e. how by means of thought God is to be again
brought about, who at an earlier time and at the beginning of this
period was recognized as alone the true. This is what we have to
consider in the last period, in dealing with Kant, Fichte, and
Schelling.
SECTION THREE

Recent German Philosophy

In the philosophy of Kant, Fichte, and Schelling, the revolution to


which in Germany mind has in these latter days advanced, was
formally thought out and expressed; the sequence of these
philosophies shows the course which thought has taken. In this
great epoch of the world’s history, whose inmost essence is laid hold
of in the philosophy of history, two nations only have played a part,
the German and the French, and this in spite of their absolute
opposition, or rather because they are so opposite. The other
nations have taken no real inward part in the same, although
politically they have indeed so done, both through their governments
and their people. In Germany this principle has burst forth as
thought, spirit, Notion; in France, in the form of actuality. In
Germany, what there is of actuality comes to us as a force of
external circumstances, and as a reaction against the same. The
task of modern German philosophy is, however, summed up in
taking as its object the unity of thought and Being, which is the
fundamental idea of philosophy generally, and comprehending it,
that is, in laying hold of the inmost significance of necessity, the
Notion (supra, p. 360). The philosophy of Kant sets forth, in the first
place, the formal aspect of the task, but it has the abstract
absoluteness of reason in self-consciousness as its sole result, and,
in one respect, it carried with it a certain character of shallowness
and want of vigour, in which an attitude of criticism and negativity is
retained, and which, as far as any positive element is concerned,
adheres to the facts of consciousness and to mere conjecture, while
it renounces thought and returns to feeling. On the other hand,
however, there sprang from this the philosophy of Fichte, which
speculatively grasps the essence of self-consciousness as concrete
egoism, but which does not reach beyond this subjective form
pertaining to the absolute. From it again comes the philosophy of
Schelling, which subsequently rejects Fichte’s teaching and sets forth
the Idea of the Absolute, the truth in and for itself.
A. Jacobi.
In connection with Kant we must here begin by speaking of
Jacobi, whose philosophy is contemporaneous with that of Kant; in
both of these the advance beyond the preceding period is very
evident. The result in the two cases is much the same, although
both the starting point and the method of progression are somewhat
different. In Jacobi’s case the stimulus was given mainly by French
philosophy, with which he was very conversant, and also by German
metaphysics, while Kant began rather from the English side, that is,
from the scepticism of Hume. Jacobi, in that negative attitude which
he preserved as well as Kant, kept before him the objective aspect
of the method of knowledge, and specially considered it, for he
declared knowledge to be in its content incapable of recognizing the
Absolute: the truth must be concrete, present, but not finite. Kant
does not consider the content, but took the view of knowledge being
subjective; and for this reason he declared it to be incapable of
recognizing absolute existence. To Kant knowledge is thus a
knowledge of phenomena only, not because the categories are
merely limited and finite, but because they are subjective. To Jacobi,
on the other hand, the chief point is that the categories are not
merely subjective, but that they themselves are conditioned. This is
an essential difference between the two points of view, even if they
both arrive at the same result.
Friedrich Heinrich Jacobi, born at Düsseldorf in 1743, held office
first in the Duchy of Berg, and then in Bavaria. He studied in Geneva
and Paris, associating in the former place with Bonnet and in the
latter with Diderot. Jacobi was a man of the highest character and
culture. He was long occupied with State affairs, and in Düsseldorf
he held a public office which was connected with the administration
of the finance department in the State. At the time of the French
Revolution he was obliged to retire. As a Bavarian official he went to
Munich, there became President of the Academy of Sciences in
1804, which office he, however, resigned in 1812; for in the
Napoleonic period Protestants were decried as demagogues. He
lived at Munich till the end of his life, and died at the same place on
the 10th of March, 1819.[315]
In the year 1785, Jacobi published Letters on Spinoza, which
were written in 1783, on the occasion of the dispute with
Mendelssohn above-mentioned (p. 406); for in none of his writings
did Jacobi develop his philosophy systematically, he set it forth in
letters only. When Mendelssohn wished to write a life of Lessing,
Jacobi sent to ask him if he knew that “Lessing was a Spinozist”
(Jacobi’s Werke, Vol. IV. Sec. 1, pp. 39, 40). Mendelssohn was
displeased at this, and it was the occasion of the correspondence. In
the course of the dispute it was made evident that those who held
themselves to be professed philosophers and possessed of a
monopoly of Lessing’s friendship, such as Nicolai, Mendelssohn, &c.,
knew nothing about Spinozism; not only was there manifested in
them the superficial character of their philosophic insight, but
ignorance as well; with Mendelssohn, for instance, this was shown
respecting even the outward history of the Spinozistic philosophy,
and much more regarding the inward (Jacobi’s Werke, Vol. IV. Sec.
1, p. 91). That Jacobi asserted Lessing to be a Spinozist, and gave a
high place to the French—this serious statement came to these good
men as a thunderbolt from the blue. They—the self-satisfied, self-
possessed, superior persons—were quite surprised that he also
made pretensions to knowledge, and of such a “dead dog” as
Spinoza (ibidem, p. 68). Explanations followed upon this, in which
Jacobi further developed his philosophic views.
Mendelssohn is directly opposed to Jacobi, for Mendelssohn took
his stand on cognition, placed true existence immediately in thought
and conception, and maintained: “What I cannot think as true does
not trouble me as doubt. A question which I do not understand, I
cannot answer, it is for me as good as no question at all.”[316] He
continued to argue on these same lines. His proof of the existence of
God thus carries with it this necessity of thought, viz. that actuality
must plainly be in thought, and a thinker must be presupposed, or
the possibility of the actual is in the thinker. “What no thinking Being
conceives as possible is not possible, and what is thought by no
thinking creature as actual cannot be actual in fact. If we take away
from anything whatsoever the conception formed by a thinking
Being that that thing is possible or actual, the thing itself is done
away with.” The Notion of the thing is thus to man the essence of
the same. “No finite Being can think the actuality of a thing in its
perfection as actual, and still less can he perceive the possibility and
actuality of all present things. There must thus be a thinking Being
or an understanding which in the most perfect way thinks the
content of all possibilities as possible, and the content of all
actualities as actual; i.e. there must be an infinite understanding,
and this is God.”[317] Here on the one hand we see a unity of
thought and Being, on the other the absolute unity as infinite
understanding—the former is the self-consciousness which is
apprehended as finite merely. Actuality, Being, has its possibility in
thought, or its possibility is thought; it is not a process from
possibility to actuality, for the possibility remains at home in the
actuality.
Jacobi maintains against these demands of thought—and this in
one view is the chief thought in his philosophy—that every method
of their demonstration leads to fatalism, atheism, and Spinozism,
[318] and presents God as derived and founded upon something
else; for comprehending Him signifies demonstrating His
dependence. Jacobi thus asserts that mediate knowledge consists in
giving a cause of something which has in its turn a finite effect, and
so on; so that a knowledge such as this can all through relate to the
finite only.
Jacobi further states upon this subject, in the first place, that
“Reason”—later on when he distinguished reason and understanding
(of which more hereafter[319]), he altered it to understanding[320]
—“can never bring to light more than the conditions of what is
conditioned, natural laws and mechanism. We comprehend a thing
when we can deduce it from its proximate causes,” and not from the
remoter causes; the most remote and quite universal cause is always
God. “Or” we know the thing if we “perceive its immediate
conditions as they come in due succession. Thus, for instance, we
comprehend a circle when we can clearly represent to ourselves the
mechanism of its origination or its physical conditions; we know the
syllogistic formulæ when we have actually come to know the laws to
which the human understanding is subject in judgment and
conclusion, its physical nature and its mechanism. For this reason we
have no conceptions of qualities as such, but only intuitions. Even of
our present existence we have a feeling only, but no conceptions.
Genuine conceptions we have merely of figure, number, position,
movement and the forms of thought; qualities are known and
understood, if they are traced back to these and objectively
annulled.” This is undoubtedly really finite knowledge, which is to
give the determinate conditions of anything determinate, to
demonstrate it as resulting from another cause, in such a way that
each condition is again conditioned and finite. Jacobi continues:
“The business of reason is really progressive union and connection,
and its speculative business is union and connection in accordance
with the known laws of necessity, i.e. of identity. Everything that
reason can bring forth by means of analysis, combination, judgment,
conclusion, and re-conception, consists in nothing but things of
nature” (i.e. finite things), “and reason itself, as a limited existence,
belongs to these things. But the whole of nature, the sum of all
conditioned existence, cannot reveal more to the investigating
understanding than what is contained in it, namely, manifold
existence, changes, a succession of forms” (the conditioned), “and
not an actual beginning” (of the world), “nor a real principle of any
objective existence.”[321]
But Jacobi in the second place here accepts reason in a wider
sense and says: “If we understand by reason the principle of
knowledge generally, it is the mind from which the whole living
nature of man is constituted; through it man arises; he is a form
which it has adopted.” With this Jacobi’s view of the attempt to know
the unconditioned is connected. “I take the whole human being, and
find that his consciousness is composed of two original conceptions,
the conceptions of the conditioned and the unconditioned. Both are
inseparably bound up with one another, and yet in such a way that
the conception of the conditioned presupposes the conception of the
unconditioned, and can be given in this alone. We are just as certain
of its existence as we are of our own conditioned existence, or even
more so. Since our conditioned existence rests on an infinitude of
mediations, there is opened up to our investigation a vast field
which, for the sake of our preservation even, we are forced to work
upon.” It would, however, be quite another thing to wish to know the
unconditioned apart from this practical end. However Jacobi here
remarks, “To try to discover the conditions of the unconditioned, to
find a possibility for absolute necessity, and to construct this last in
order to be able to comprehend it, is what we undertake when we
endeavour to make nature an existence comprehensible to us, i.e. a
merely natural existence, and to bring the mechanism of the
principle of mechanism into the light of day. For if everything which
can be said to arise and be present in a way comprehensible to us,
must arise and be present in a conditioned way, we remain, so long
as we continue to comprehend, in a chain of conditioned conditions.
Where this chain breaks off, we cease to comprehend, and there the
connection which we call nature likewise ceases. The conception of
the possibility of the outward existence of nature would thus be the
conception of an absolute beginning or origin of nature; it would be
the conception of the unconditioned itself in so far as it is a
conditioning of nature not naturally connected, i.e. a conditioning of
nature unconnected and unconditioned for us. Now should a
conception of what is thus unconditioned and unconnected, and
consequently supernatural, be possible, the unconditioned must
cease to be unconditioned, it must itself receive conditions; and
absolute necessity must commence to be possibility in order that it
may allow itself to be constructed.”[322] This is contradictory.
Jacobi then passes on from this point to the second of his main
propositions, “The unconditioned is called the supernatural. Now
since everything which lies outside the connection of what is
conditioned, of what is naturally mediated, also lies outside the
sphere of our clear and certain knowledge, and cannot be
understood through conceptions, the supernatural cannot be
accepted in any other way by us than that in which it is given to us
—namely as a fact. It is! This supernatural, this essence of all
essence, all tongues join in proclaiming to be God.”[323] God as the
universal, the true, is here taken in the sense of a spiritual generally,
in the sense of power, wisdom, &c. That God is, however, is to
Jacobi not absolutely true; for to knowledge pertains His objective
absolute existence, but He cannot be said to be known. It is thus
merely a fact of my consciousness that God exists independently
apart from my consciousness; this, however, is itself maintained
through my consciousness; the subjective attitude of thought is thus
to Jacobi the element of most importance. The consciousness of
God, which is in our consciousness, is, however, of such a nature
that along with the thought of God we have immediately associated
the fact that He is. The existence of the supernatural and
supersensuous, to which the thought of man regarding the natural
and finite passes on, is just as certain to Jacobi as he is himself. This
certainty is identical with his self-consciousness; as certainly as I am,
so certainly is God (Jacobi’s Werke, Vol. III. p. 35). Since he thus
passes back into self-consciousness, the unconditioned is only for us
in an immediate way; this immediate knowledge Jacobi calls Faith,
inward revelation (Werke, Vol. II. pp. 3, 4); to this appeal can be
made in man. God, the absolute, the unconditioned, cannot,
according to Jacobi, be proved. For proof, comprehension, means to
discover conditions for something, to derive it from conditions; but a
derived absolute, God, &c., would thus not be absolute at all, would
not be unconditioned, would not be God (Jacobi’s Werke, Vol. III. p.
7). This immediate knowledge of God is then the point which is
maintained in the philosophy of Jacobi. The faith of Kant and of
Jacobi are, however, different. To Kant it is a postulate of reason, it
is the demand for the solution of the contradiction between the
world and goodness; to Jacobi it is represented on its own account
as immediate knowledge.
Everything which has been written upon God since Jacobi’s time,
by philosophers such as Fries and by theologians, rests on this
conception of immediate intellectual knowledge, and men even call
this revelation, though in another sense than the revelation of
theology. Revelation as immediate knowledge is in ourselves, while
the Church holds revelation to be something imparted from without.
[324] In the theological sense, faith is faith in something which is
given to us through teaching. It is a sort of deception when faith and
revelation are spoken of and represented as if faith and revelation in
the theological sense were here in question; for the sense in which
they are used, and which may be termed philosophic, is quite a
different one, however pious an air may be assumed in using the
terms. This is Jacobi’s standpoint, and whatever is by philosophers
and theologians said against it, this teaching is eagerly accepted and
disseminated. And nowhere is there anything to be found but
reflections originating from Jacobi, whereby immediate knowledge is
opposed to philosophic knowledge and to reason; and people speak
of reason, philosophy, &c., as a blind man speaks of colours. It is,
indeed, allowed that a man cannot make shoes unless he is a
shoemaker, even although he have the measure and foot, and also
the hands. But when Philosophy is concerned, immediate knowledge
signifies that every man as he walks and stands is a philosopher,
that he can dogmatize as he chooses, and that he is completely
acquainted with Philosophy.
By reason, however, mediate knowledge merely is on the one
hand understood, and on the other the intellectual perception which
speaks of facts (supra, pp. 413-415). In this respect it is true that
reason is the knowledge and revelation of absolute truth, since the
understanding is the revelation of the finite (Jacobi’s Werke, Vol. II.
pp. 8-14, 101). “We maintained that two different powers of
perception in man have to be accepted: a power of perception
through visible and tangible and consequently corporeal organs of
perception, and another kind of power, viz. through an invisible
organ which in no way represents itself to the outward senses, and
whose existence is made known to us through feeling alone. This
organ, a spiritual eye for spiritual objects, has been called by men—
generally speaking—reason. He whom the pure feelings of the
beautiful and good, of admiration and love, of respect and awe, do
not convince that in and with these feelings he perceives something
to be present which is independent of them, and which is
unattainable by the outward senses or by an understanding directed
upon their perceptions alone—such an one cannot be argued with”
(Jacobi’s Werke, Vol. II. pp. 74, 76). But by faith Jacobi likewise
understands all that has immediacy of Being for me: “Through faith
we know that we have a body, we become aware of other actual
things, and that indeed with the same certainty with which we are
aware of ourselves. We obtain all conceptions through the qualities
which we receive and accept, and there is no other way of attaining
real knowledge; for reason, when it begets objects, begets
phantoms of the brain. Thus we have a revelation of nature.”[325]
Hence the expression faith, which had a deep significance in religion,
is made use of for different contents of every kind; this in our own
time is the point of view most commonly adopted.
Jacobi here brings faith into opposition with thought. Let us
compare the two, and discover whether they are separated by so
great a chasm as those who thus oppose them think. On the one
hand absolute existence is to faith immediate; believing
consciousness feels itself penetrated by this as by its essence: that
existence is its life, believing consciousness asserts itself to be in
direct unity with it. Thought thinks the absolute existence; such
existence is to it absolute thought, absolute understanding, pure
thought; but that signifies that it is likewise immediate itself. On the
other hand to faith the immediacy of absolute existence has also the
significance of a Being: it is, and is another than ‘I.’ And the same is
true of the thinker; to him it is absolute Being, actual in itself, and
different from self-consciousness or thought as finite understanding,
to use the common term. Now what is the reason that faith and
thought do not understand one another, and each recognize itself in
the other? In the first place faith has no consciousness of being a
thought, inasmuch as it asserts absolute consciousness to be
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookluna.com

You might also like