C# From A to Z - Lesson 36: Strings (Clone - Copy - CopyTo)

C# From A to Z - Lesson 36: Strings (Clone - Copy - CopyTo)


Lessons Index:

Lesson 1: Comments
Lesson 2: Value vs Reference Types
Lesson 3: Built-in Value Types
Lesson 4: Variables and Constants
Lesson 5: Variables & Constant Examples
Lesson 6: Operators
Lesson 7: Operators Examples
Lesson 8: Casting & Conversion
Lesson 9: Casting & Conversion Examples
Lesson 10: Enumerations
Lesson 11: Enumerations Examples
Lesson 12: The USING Statement
Lesson 13: The IF Statement
Lesson 14: The Switch Statement
Lesson 15: Loops
Lesson 16: Loops Examples
Lesson 17: Declaring Variables
Lesson 18: Access Modifiers
Lesson 19: Constants
Lesson 20: Type Converting
Lesson 21: System.Convert Classes
Lesson 22: System.Convert Shortcuts
Lesson 23: Formatting Output
Lesson 24: Object Oriented Programming (OOP) - Part1
Lesson 25: OOP - Part2
Lesson 26: OOP - Part3
Lesson 27: OOP - Part4
Lesson 28: OOP - Part5
Lesson 29: OOP - Part6
Lesson 30: OOP - Part7
Lesson 31: OOP - Part8
Lesson 32: .NET Strings
Lesson 33: Strings Length & Case
Lesson 34: Concatenate & StringBuilder
Lesson 35: More StringBuilder
Lesson 36: Clone - Copy - CopyTo
Lesson 37: Substrings - Trim - Pad ... Part1
Lesson 38: Substrings - Trim - Pad ... Part2
Lesson 39: GetType - Compare - Equality
Lesson 40: Regular Expressions...Part1
Lesson 41: Regular Expressions...Part2
Lesson 42: String Format
...and more to come.
Closed Caption:

let's talk about copy
cloning and copy to now we know that
string builders going to be a lot better
for
topping and working with our strange
because the string
type is immutable and its reference
type:
and it's going to create a new optics
whenever it needs to actually
create a copy or concatenate strings
together
because it immutable you can change it
so it has to create a new copy for that
so for fish in sea sick
stream builders really really fast
extremely fast but we can continue
just to show you how you can actually
work with cloning copying
and copy to cloning is going to create
and object that's based on this track so
you but specified object give
their opponents not and then you going
to do estar con
to actually clone this train into an
object
so then we're going to actually be up to
change this object actually
just like that and then when we write it
out want to write out we're going to use
the doc to string
to specify that as the output because
that's going to be available
from the dot notation because we're
dealing with an object
now them want output are
old string to see that it's still going
to be what it is for making a copy
but we're awesome cloning it into an
object so when I'm actually referencing
the same data area because we can
actually see that the first ring
is still intact but we're creating a
reference to eight new copy a clone of
this critical project
of the string so take pic that and then
you see that
after the con copy copy to strings setup
s2 has been set the exclamation s wanna
still want it used to be
and now let's see how the other ones
work as well
so we're creating a reference though
creating an object
and a reference to data now
the copy here
this is going to create a copy of our
string into another structure
s trees on a string and then we're just
going to string that copy
and then the name of the variable the
string that we want to copy
so this is another way to do that to
copy and if you want to copy to
what we're doing is we're copying tomb
and array of charge as you can see here
recruiting charge
an array of three charge in this format
and then we're doing esta copy to them
because that's available from team
actual string variable there
there would be the start of our index
charge would be the
character string the character rang that
we want to actually
copy to and we're going to copy this
into are
capture a wreck so this is going to be
where we're going to start
within our chars and this is the link
the number of characters were going to
put into this array of characters
so different way she could work with
continuing to work with your strengths
it's really robust there's a lot of ways
you can actually work and working with
an object in strange and
back and forth and dealing with the
references its
pretty much up to you how you want to
deal with thanks StringBuilder again
it's going to be
the fastest way to process your
strengths and it's going to be extremely
efficient
so it's been at it for you and its
optimizing it works really really nicely
so
I would suggest you work a lot with the
StringBuilder

Video Length: 03:27
Uploaded By: zoom1177
View Count: 3,183

Related Software Products
CopyTo
CopyTo

Published By:
VSO Software

Description:
Burn CDs, DVDs, and Blu-ray disks. CopyTo is compatible with all disks and drives. Burn audio / video / data / iso files and compatible DVD video and blu-ray structured folders. A smart data analyzer integrated in CopyTo makes your burning tasks easier as the program suggests the best output format (burn audio CD, burn to DVD, burn DVD Video...). Besides burning you can also copy from disk to disk. Version 5 has added special support for your music needs: create mp3 disks (converts your ...


Related Videos
Visual Basic 2010 Copy To StartUp Tutorial
Visual Basic 2010 Copy To StartUp Tutorial

How to make a program that wil copy itself to startup folder. Code: Dim OS() As String Dim UserName() as String Form1.Load OS = My.Computer.Info.OSFullName.Split(" ") UserName = My.User.Name.Split("\") TextBox1.Text = OS(2) TextBox2.Text = UserName(1) If OS(2) = "XP" Then TextBox3.Text = "C:\Documents and Settings\" & UserName(1) & "\Start Menu\Programs\Startup\" & Application.ProductName & ".exe" Else ...
Video Length: 06:00
Uploaded By: Jakob Erzar
View Count: 6,998

Kat Kerr - Copy to all heaven !! [Must watch]
Kat Kerr - Copy to all heaven !! [Must watch]

If interested, please "Like" and "Share" Do not forget the "Subscribe" for more compelling videos and more meaningful ahead. Visited channels: https://goo.gl/fKGPFD hr / bClosed Caption:/b well when God does stuff in our life it's the same thing we're going to be in contact with new people may be going to new places totally doing things a different way than we ever have before maybe even we did something similar butbr ...
Video Length: 44:22
Uploaded By: Kat Kerr Author
View Count: 1,542

C# List CopyTo and ToArray
C# List CopyTo and ToArray

Shows using the CopyTo() and ToArray() methods on a List and implementing such. hr / bClosed Caption:/b sobel the new understand well home by now that all this the simply a rapper around an actual rare raise do not size dynamically but as programmers would like things to size dynamically Mb bucks won't so we can a Baker by making these less data structures and all they do underneath his maintain an array ...
Video Length: 04:13
Uploaded By: Jamie King
View Count: 1,378

How to use Dynamics NAV Copy to and from Excel
How to use Dynamics NAV Copy to and from Excel

How to use Dynamics NAV Copy to and from Excel, presented by Match Business Solutions hr / bClosed Caption:/b in this presentation we're going to see how to copy to and from excel for microsoft dynamics nav first we do a copy to excel that a copy from excel and then we look at more design changes that we have sometimes to do to enable the copy from Excel let's start by going to a general journal going to top left print ...
Video Length: 12:01
Uploaded By: Eric Durand
View Count: 1,199

Add 'CopyTo' & 'MoveTo' in Context Menu
Add 'CopyTo' & 'MoveTo' in Context Menu

By default Windows XP, 7 gives only "cut" and "copy", but with a simple trick you can add a "copy to" and a "move to" option too into your right click context menu. In case your .reg file is not working, check if the following error occurred: "ContextMenuHan­-dlers" instead of "ContextMenuHan­dlers". This is a copy paste problem... Add options: ------------------------------------------- REGEDIT4 br ...
Video Length: 01:47
Uploaded By: furulevi
View Count: 330

A Simple XY script: copyto
A Simple XY script: copyto

This video shows how to write a very simple script to copy a file to another folder using XYplorer scripting. Scripting can be used to automate several tedious and banal file management tasks with one mouse click. Links: XYplorer home: http://www.xyplorer.com/ A Tour to XY scripting: http://www.xyplorer.com/tour/index.ph... XY Forum Script exchange: http://www.xyplorer.com/xyfc/viewforu...
Video Length: 01:37
Uploaded By: Seren dipity
View Count: 316

ACDSee Pro 6. 'CopyTo...' - delay demo
ACDSee Pro 6. 'CopyTo...' - delay demo

ACDSee Pro 6 is inaccessible for more than 20 seconds during 'Copy to...' --operations.
Video Length: 01:03
Uploaded By: Lars Hansen
View Count: 284

Daily Planner Copy to Google Apps
Daily Planner Copy to Google Apps

Daily Planner Copy to Google Apps hr / bClosed Caption:/b did you know that you can export data for your students directly from the daily planner information can then be copy pasted into scripts in Google Maps see how the process works from your daily planner click the Data tab from the Data tab click the second option all student data in Excel documents click open to open the Excel ...
Video Length: 01:46
Uploaded By: Fargo Public Schools
View Count: 241

Copyright © 2025, Ivertech. All rights reserved.