I.T. Discussion Community!
-Collapse +Expand
C#
Search C# Group:

Advanced
-Collapse +Expand C# To/From
To/FromCODEGuides
-Collapse +Expand C# Study Test
PRESTWOODCERTIFIED
-Collapse +Expand C# Store
PRESTWOODSTORE

Prestwood eMagazine

June Edition
Subscribe now! It's Free!
Enter your email:

   ► KB ►► ProgrammingC#   Print This    All Groups  

C# (Visual C# & VS.Net) New and Updated KB Posts

Page Contents


Recently Created

(C# (Visual C# & VS.Net) Group)

  KB Article    

Bryan Valencia
1. Consuming an RSS feed in ASP.NET

Using this quickie code snippet, you can attach an ASP:Gridview  to an external RSS Feed.

All you need to accomplish this is the URL of a usable feed.

Posted to KB Topic: WebForms Coding Tasks
9 years ago
(2 Comments , last by Hanvi.j )

Code
Nothing New Since Your Last Visit
18441
Hits

Bryan Valencia
2. Using a Legacy Windows DLL in ASP.NET

This article will show how to access a function in a legacy COM dll from a ASP.NET web page. By legacy I mean a dll that is not a .NET managed code dll (a Win32 DLL). 

Posted to KB Topic: WebForms Coding Tasks
10 years ago

KB Post
Nothing New Since Your Last Visit
10997
Hits

Bryan Valencia
3. Using GenericIdentity for Cross Platform Authentication in the .NET framework

When designing a WinForms application, the most straightforward way to authenticate a user is using NTLM or Active Directory using WindowsIdentity.GetCurrent. Over the Internet, you can use the whole ASP.Net security setup with Membership.GetUser. The GenericPrincipal object works well when you deploy to a mixed web/WinForms environment. See new GenericIdentity.

Posted to KB Topic: WebForms Coding Tasks
10 years ago

KB Post
Nothing New Since Your Last Visit
14547
Hits

Mike Prestwood
4. C# Empty String Check (String.IsNullOrEmpty)

The .Net framework offers a static method in the string class: String.IsNullOrEmpty.

Posted to KB Topic: C#
10 years ago

Code
Nothing New Since Your Last Visit
9686
Hits

khemebuen
5. Extension Methods in C#

Add new methods to predefined types and objects with extension methods (no need to recompile the base code).  To use this extension, all i have to do is include the  namespace ExtensionExample.

Posted to KB Topic: OOP
10 years ago, and updated 10 years ago

Blog
Nothing New Since Your Last Visit
6719
Hits

Mike Prestwood
6. C# Pointers

Although pointer data types in C# coding are less important than in other languages such as C++, C# does support developer defined pointers. Use the * operator to declare a pointer data type. Use the & operator to return the current address of a variable.

In .Net managed coding the use of pointers is not safe because the garbage collector may move memory around. To safely use pointers, use the unsafe keyword.

C++/CLI has more extensive support for pointers than C#. If you have needs that go beyond what C# offers, you can code in C++/CLI and add it to your project.

Posted to KB Topic: Language Details
10 years ago

Code
Nothing New Since Your Last Visit
8484
Hits

Mike Prestwood
7. C# Self Keyword (this)

To refer to the current instance of a class, use the this keyword. The this keyword provides a way to refer to the specific instance in which the code is currently executing. It is particularly useful for passing information about the currently executing instance.

The this keyword is also used as a modifier of the first parameter of an extension method.

You cannot use this with static method functions because static methods do not belong to an object instance. If you try, you'll get an error.

Posted to KB Topic: OOP
10 years ago
(4 Comments , last by Mike.B3 )

Code
Nothing New Since Your Last Visit
21900
Hits

Mike Prestwood
8. C# Member Modifiers

The method modifiers are abstract, extern, new, partial, sealed, virtual, and override. Specify C# member modifiers as follows:

abstract SomeMethod() {..}

The field modifiers are const, readonly, static, volatile. Specify field modifiers as follows:

readonly int MyAge;

Posted to KB Topic: OOP
10 years ago

Code
Nothing New Since Your Last Visit
7519
Hits

Mike Prestwood
9. C# Logical Operators

Same as C++ and Java. C# logical operators:

& and, as in this and that No Short Circuit
&& and, as in this and that short circuits
| or, as in this or that No Short Circuit
|| or, as in this or that short circuits
! Not, as in Not This
^ either or, as in this or that but not both

Posted to KB Topic: Language Basics
10 years ago

Code
Nothing New Since Your Last Visit
9268
Hits

Mike Prestwood
10. C# Deployment Overview

C# projects require the .Net framework and any additional dependencies you've added such as Crystal Reports.

In Visual Studio.Net, you can create a Setup and Deployment project by using any of the templates available on the New Project dialog (Other Project Types).

In addition, C# projects also support ClickOnce which brings the ease of Web deployment to Windows Forms and console applications. To get started, right click on your solution in the Solution Explorer, click Properties then select the Security tab. 

In addition, you can use any of the many free and commercially available installation packages.

Posted to KB Topic: Tool Basics
10 years ago

Code
Nothing New Since Your Last Visit
7282
Hits




Recently Updated

(C# (Visual C# & VS.Net) Group)

  KB Article    

Bryan Valencia
1. Consuming an RSS feed in ASP.NET

Using this quickie code snippet, you can attach an ASP:Gridview  to an external RSS Feed.

All you need to accomplish this is the URL of a usable feed.

Posted to KB Topic: WebForms Coding Tasks
9 years ago
(2 Comments , last by Hanvi.j )

Code
Nothing New Since Your Last Visit
18441
Hits

khemebuen
2. Extension Methods in C#

Add new methods to predefined types and objects with extension methods (no need to recompile the base code).  To use this extension, all i have to do is include the  namespace ExtensionExample.

Posted to KB Topic: OOP
10 years ago, and updated 10 years ago

Blog
Nothing New Since Your Last Visit
6719
Hits

Bryan Valencia
3. Using a Legacy Windows DLL in ASP.NET

This article will show how to access a function in a legacy COM dll from a ASP.NET web page. By legacy I mean a dll that is not a .NET managed code dll (a Win32 DLL). 

Posted to KB Topic: WebForms Coding Tasks
10 years ago

KB Post
Nothing New Since Your Last Visit
10997
Hits

Bryan Valencia
4. Using GenericIdentity for Cross Platform Authentication in the .NET framework

When designing a WinForms application, the most straightforward way to authenticate a user is using NTLM or Active Directory using WindowsIdentity.GetCurrent. Over the Internet, you can use the whole ASP.Net security setup with Membership.GetUser. The GenericPrincipal object works well when you deploy to a mixed web/WinForms environment. See new GenericIdentity.

Posted to KB Topic: WebForms Coding Tasks
10 years ago

KB Post
Nothing New Since Your Last Visit
14547
Hits

Bryan Valencia
5. Getting Website Root Directory in C# ASP.NET

This code shows how to ask the webserver where the site's root directory is, and how to convert a relative path (like /Uploads) to the full filesystem path.  This will work across environments (i.e. Development/QA/Production).

Posted to KB Topic: WebForms Coding Tasks
11 years ago, and updated 10 years ago
(3 Comments , last by Dean.M )

Code
Nothing New Since Your Last Visit
17839
Hits

Mike Prestwood
6. C# Base Class (System.Object)

In C#, the Object keyword is an alias for the base System.Object class and is the single base class all classes ultimately inherit from.

Posted to KB Topic: OOP
11 years ago, and updated 10 years ago

Code
Nothing New Since Your Last Visit  
7961
Hits

Mike Prestwood
7. C# Case Sensitivity (Yes)

C# is case sensitive. The following does NOT:

messagebox.Show("hello"); //Does not work!

The first time you type any other case for commands or variables, VS.Net will change it to the accepted or defined case. For example, if you type messagebox.show it is converted to MessageBox.Show. Once corrected, you can break it again by editing MessageBox to messagebox and the compiler will give you an error.

Posted to KB Topic: Tool Basics
11 years ago, and updated 10 years ago

Code

KB Post
Nothing New Since Your Last Visit  
10107
Hits

Mike Prestwood
8. C# Empty String Check (String.IsNullOrEmpty)

The .Net framework offers a static method in the string class: String.IsNullOrEmpty.

Posted to KB Topic: C#
10 years ago

Code
Nothing New Since Your Last Visit
9686
Hits

Mike Prestwood
9. C# Member Method

In C# you can set the visibility of a member field to any visibility: private, protected, public, internal or protected internal. You can intialize a member field with a default when declared. If you set the member field value in your constructor, it will override the default value. Finally, you can use the static modifier (no instance required) and readonly modifier (similar to a constant).

Posted to KB Topic: OOP
11 years ago, and updated 10 years ago
(1 Comments , last by KalaP.Bros.K )

Code

Article
Nothing New Since Your Last Visit
12922
Hits

Bryan Valencia
10. How to open a URL in a pop-up window. Every now and then you want a link to open not only in a new browser, but you may want to give the new window the appearance of a pop-up window. This ASP/Javascript method gives you a lot of control and is easy to figure out and implement.
Posted to KB Topic: WebForms Coding Tasks
11 years ago, and updated 10 years ago
(1 Comments , last by Wes )

KB Post
Nothing New Since Your Last Visit
49502
Hits
Icon Legend:
Recent or not:
- Recent activity (within last two weeks).
- No activity last two weeks.
 Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech