tag:blogger.com,1999:blog-32157597270781714772024-03-14T06:39:37.323+05:00Techie GeekThis site is all about Software Development Technology, giving wide range of information on the software development and latest technology overview. Provide information related to Microsoft Dot NET Technology and much more...Unknownnoreply@blogger.comBlogger71125tag:blogger.com,1999:blog-3215759727078171477.post-81461701110779811242015-08-01T23:12:00.000+05:002015-08-01T23:12:14.193+05:00calculate 1+2+…+n in C# without *,/ and keywords for, while, switch, and case, as well as a conditional operator
How do you calculate 1+2+…+n in C# without multiplication, division, key words including for, while, switch, and case, as well as a conditional operator ( A?B:C)?
using System;
using System.Linq;
namespace MiscPrograms
{
class SumSeriesProgram
{
static void Main(string[] args)
{
int N = 5;
Console.WriteLine("Sum for Series 1+2+... upto N={0Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-27274115019972053552014-08-09T14:01:00.001+05:002014-08-09T14:01:33.204+05:00Agile Software Development
Agile software development
Agile software development is a group of software development methodologies based on iterative and incremental development, where requirements and solutions evolve through collaboration between self-organizing, cross-functional teams. It promotes adaptive planning, evolutionary development and delivery, a time-boxed iterative Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-70768205125510809182014-05-17T23:18:00.000+05:002014-05-17T23:18:20.244+05:00NDepend V5: Improvments and New Features
Improvments and New Features:
NDepend is improving day by day, and with the release of version (V5) more features and enhancements are onboard. I started using NDepend from last year, and I used it often for improving my development capabilities and coding technique. NDepend makes it easier for you to analyze the code and identifies the lacking areas and Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-44442664983234113342013-05-25T22:47:00.000+05:002013-05-27T00:38:05.699+05:00NDepend V4: A Product Review
About NDepend:
This is the first time
since beginning of my career, that I am using tool for measuring the
application. NDepend is unique and innovative tool which predicts about the
application and states the factors that are critical to well developed software
application, and shows results in a graphical manner. It incorporates several
Code Metrics, Standard and Custom Rules Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-47603648111595257442012-12-13T23:10:00.001+05:002012-12-13T23:11:18.116+05:00Struct Vs Class in C#
·
Structs
are value types and classes are reference types.
·
Value
type instances are allocated on the stack. Reference type instances are
allocated on the heap.
·
In
.Net the struct and class declarations differentiate Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-52074191671689537992012-11-10T21:37:00.000+05:002012-11-10T21:37:47.346+05:00User-Defined Conversions in C#: implicit or explicit C# allows programmers to declare conversions on classes or structs so that classes or structs can be converted to and/or from other classes or structs, or basic types. Conversions are defined like operators and are named for the type to which they convert.
In C#, conversions can be declared either as implicit, which occur automatically when required, or explicit, which require a cast to be Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-90615133999041775032012-11-02T09:45:00.002+05:002012-11-02T09:56:13.690+05:00[GIVE AWAY] 1AVShare, the ultimate secure file sharing software for free.
PCWinSoft brings to you an exciting offer. The company is giving away free licenses of 1AVShare, the ultimate file sharing software. 1AVShare costs $49.95 but in here you get it for FREE.
1AVShare is a cool lightweight gadget that allows you to share files with your friends and co-workers in a safe and secure environment: 1AVShare publishes a 128-bit encrypted password protected website Unknownnoreply@blogger.comtag:blogger.com,1999:blog-3215759727078171477.post-39364969343897305002012-04-23T15:42:00.000+05:002012-04-23T15:42:03.019+05:00Populating Local Computer "Users" and "Groups" using C# DotNet 4.0
You need to have include reference to following two dlls:
using System.DirectoryServices;using System.DirectoryServices.AccountManagement;
Adding reference for DLLs
1: static void Main(string[] args) 2: { 3: List<string> usersList = new List<string>(); 4: Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-27388194246938032952012-02-15T12:15:00.000+05:002012-02-15T12:15:16.263+05:00C# Bitwise Shift OperatorsC# Bitwise Shift Operators
The bitwise shift operators in the C# language to an integral type provides a way to change the bit representation of a type so that the bits are shifted right or shifted left a certain number of positions. The C# language enables bitwise shifting by offering the right shift (>>) and left shift (<<) operators directly in the language. The term "Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-45615267939785790072012-02-04T23:58:00.004+05:002012-02-05T00:07:04.899+05:00Method Parameters (• params • ref • out )
Method Parameters If a parameter is declared for a method without ref or out, the parameter can have a value associated with it. That value can be changed in the method, but the changed value will not be retained when control passes back to the calling procedure. By using a method parameter keyword, you can change this behavior.Keywords you can use when declaring method Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-21944092527521363552012-01-05T22:08:00.002+05:002012-01-06T21:53:56.226+05:00BigInteger Structure in .Net 4.0BigInteger
.NET 4.0 introduces a new namespace named System.Numerics(in System.Numerics.dll) , which defines a structure named BigInteger. Represents an arbitrarily large signed integer.
The BigInteger type is an immutable type (BigInteger objects are immutable, which means that internally, the common language runtime actually creates a new BigInteger object and assigns it a value one Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-12111381438448852272011-12-06T00:23:00.002+05:002011-12-06T00:27:58.149+05:00Tuple Class (.NET Framework 4)Tuple Class (System.Tuple)
Web definitions
"A tuple (or n-tuple) is a fixed size collection of elements. Pairs, triples, quadruples etc. are tuples. In a programming language, a tuple is a data object containing other objects as elements. These element objects may be of different types.""In mathematics, a tuple is a finite sequence (also known as an ordered list) of objects, each of a specified Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-21149983164334129792011-09-29T23:20:00.000+05:002011-09-29T00:34:07.565+05:00The Model-View-ViewModel (MVVM) Design Pattern
MVVM PatternThe Model-View-ViewModel (MVVM) pattern helps you to cleanly separate the business and presentation logic of your application from its user interface (UI). Maintaining a clean separation between application logic and UI helps to address numerous development and design issues and can make your application much easier to test, maintain, and evolve. It can also greatly increase code Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-28124120287243867052011-09-20T00:09:00.002+05:002011-09-20T00:10:24.708+05:00Silverlight ListBoxItem Double Click Event
Following is the Code snippet for the List Box Item double click event using Silverlight 4:
XAML (MainPage.Xaml):
CODE(MainPage.Xaml.cs):
using System;using System.Windows;using System.Windows.Controls;using System.Windows.Browser;using System.Windows.Input; namespace ListBoxDoubleClick{ public partial class MainPage&Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-5922697613834484562011-07-21T00:04:00.002+05:002011-07-21T00:05:40.613+05:00WPF Routed EventRouted Events
Functional definition: A routed event is a type of event that can invoke handlers on multiple listeners in an element tree, rather than just on the object that raised the event.
Implementation definition: A routed event is a CLR event that is backed by an instance of the RoutedEvent class and is processed by the Windows Presentation Foundation (WPF) event system.A particular Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-18145857531789125272011-07-13T23:14:00.000+05:002011-07-13T23:14:20.313+05:00Func TypeFunc Type
You can use the Func delegate to pass a method as a parameter without explicitly declaring a custom delegate.You can use this delegate to represent a method that can be passed as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-59888846455284869262011-07-13T22:58:00.000+05:002011-07-13T22:58:32.777+05:00Action TypeAction Type
You can use the Action delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have one parameter that is passed to it by value, and it must not return a Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-14738980784230454812011-07-06T23:47:00.002+05:002011-07-07T00:15:53.458+05:00UML RelationshipUML Relationships
In an ER diagram for two entities A and B, we can show only one type of relationship–a Relational relationship–which means that entity A is somehow related to entity B. But in a class diagram, the relationships can be further divided on the basis of object-oriented principles such as inheritance, association, and so on. The following sections describe the main UML relationshipsUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-41994251841129767002011-02-25T23:49:00.000+05:002011-02-25T23:49:17.742+05:00Compare File versions using System.IO.Version class
Following is the sample code to compare versions for two file:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
static void Main(string[] args)
{
string strFileVersion1 = "1.0.2254.37578";
string strFileVersion2 = "1.0.2254.36884";
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-8027429953619266552011-02-15T22:55:00.000+05:002011-02-15T22:55:42.899+05:00Environment.SpecialFolder Enumeration
In Dot net path for these special folders can be accesses by using the following method:
Environment.GetFolderPath(Environment.SpecialFolder.Personal)Or
Environment.GetFolderPath(Environment.SpecialFolder.Windows)
Following are the paths for the dot net framework versions 2.0,3.5 and 4.0 respectively:
Environment.SpecialFolder (For Dotnet 2.0)
ApplicationData C:\Users\Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-19736559075267883472011-02-13T02:10:00.001+05:002011-02-14T17:42:36.541+05:00How to pass Command line arguments in C# To pass command line argument, create a windows form application and the Main() method should look like:
[STAThread]
static void Main()
{
string[] args = Environment.GetCommandLineArgs();
&Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-66091974884767814422011-02-12T23:53:00.002+05:002011-07-03T02:18:33.803+05:00How to set Image.Source in WPF?
I found this information to be useful for newbie, as setting up the image source from the code is not straight forward
in WPF Application. Consider following XAML
XAML::
<image Name="imgApplication" HorizontalAlignment="Center" Source="myApp.png" Margin="0,0,17,0" VerticalAlignment="Center" Stretch="None"/>
here if we want to change this "imgApplication" image with some other image from Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-65207525619001546952010-12-29T22:16:00.001+05:002010-12-29T22:17:29.962+05:00What is JQuery?History
jQuery 1.0 was released in 2006 and was originally written primarily by John Resig of the Mozilla Software Foundation. What was originally a cross-browser means of easy DOM traversal and manipulation has now grown into a mature, full-featured library resource that contains not just tools that make working with the DOM a pleasure, but many additional and robust tools that make JavaScript Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-685701539300414212010-04-23T09:26:00.000+05:002010-04-23T09:26:17.521+05:00How to get string in Title caseHere is the code example for converting the string to title case
DateTime todaysDate = DateTime.Now;
CultureInfo properCase = System.Threading.Thread.CurrentThread.CurrentCulture;
TextInfo textInfoObject = properCase.TextInfo;
grp.DrawString(textInfoObject.ToTitleCase(todaysDate.ToString("MMMM")) + " " + todaysDate.Year, new Font(new FontFamily("verdana"), 12, FontStyle.Bold), new SolidBrush(Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3215759727078171477.post-54832481557590565252009-10-25T03:01:00.000+06:002009-10-25T03:01:54.408+06:00Autocomplete textbox in C#Here is the code to develop auto complete text box.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
private void Form1_Load(object sender, EventArgs e)
{
AutoCompleteStringCollection autolist = new AutoCompleteStringCollection();
Unknownnoreply@blogger.com0